w
c
Examplel #2 Un obiect fără proprietăţi nu mai este considerat "vih d"
<?php
class test {}
$t = new test();
var_dump(empty($t)); // echo bool(false)
if ($t) {}
?>
Example #3 În unele cazuri clasele trebuie declarate Call înainte de a fi utilizate
<?php
// funcÅ£ionează fÄ jƒră erori:
$a = new a();
class a {}
// aruncă o eroare:
$a = new b();
interface c{}
class b implements c {}
?>
Th__call function will also lowercasej the method arguement:
<?php
function __call($method, $args) {} else Call {}
}
?>
(= false)
Three more that we discovered:
== 1. No longer can re-assign $this ==
The follwoing example works under PHP4 (it outputs "OK"), but produces a fatal error under PHP5:
<?php
class a
{}
}
class b
{}
}
$myClass = new b();
echo $myClass->text;
?>
== 2. No comments allowed after shorthand echo block ==
The follwoing example works under PHP4, but produces a sytax error under PHP5.
<?=//comment?>
== 3. Constructors return a reference as default ==
The follwoing example works under PHP4, but produces an E_NOTICE notice under PHP5.
<?php
class MyClass {} }
$myObj = null;
$myObj &= new MyClass();
?>
Removing the ampersand solves the problem
As with array_merge(), array_merge_recursive() returns NULL in PHP 5 if a non-array parameter is passed to it.
Not mentioned above: The PHP/FI 2 function style (old_function aka cfunction) is no longer supported as of PHP 5.
addition of the note on 07-Sep-2004 06:40
if you write down your code like this PHP5 will just work fine:
<?php
$array_1 = array('key1'=>'oranges','key2'=>'apples');
$array_2 = array('key3'=>'pears','key4'=>'tomatoes');
$array_3 = array();
bPHP: Schimbări incompatibile în sens invers - Manual Is Björk Lyrics Come To Me u g z Call Conference
lPHP: Schimbări incompatibile în sens invers - Manual Is Björk Lyrics Come To Me n l Call