Re: PHP-Frage
- From
- Michael Lestinsky <michael@...>
- Date
Am 11.08.'03 schrieb Robert Schiele:
> On Mon, Aug 11, 2003 at 08:56:46PM +0200, Michael Lestinsky wrote:
> > Hallo allerseits,
> >
> > langsam aber kontinuierlich bin ich verzweifeln an PHP. Kann irgendjemand
> > der Mitleser mir folgendes Verhalten erklären?
> >
> > michael@zaphod:~> php -v
> > PHP 4.3.0 (cli) (built: May 15 2003 20:40:44)
> > Copyright (c) 1997-2002 The PHP Group
> > Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
> > michael@zaphod:~> echo '<?php if ("rk" == 0) echo "Jepp\n"; ?>' | php
>
> Hier wird der String "rk" in eine Zahl konvertiert. "rk" enthaelt keinen
> korrekten Zahlwert, ist also 0. Somit 0 == 0, was offensichtlich korrekt ist.
Und warum wird hier nicht anderst herum gecastet? Warum wird 0 nicht zu
"0"? Warum ist das nicht im PHP-Manual hinreichend erläutert, was wann
wohingecastet wird?
Bye
Michael
--
"Matrimony isn't a word, it's a sentence."
application/pgp-signature Anhang: stored
Thread
In reply to: Re: PHP-Frage Robert Schiele <rschiele@...>
Follow-ups:
- Re: PHP-Frage Robert Schiele <rschiele@...>