3v4l.org

run code in 300+ PHP versions simultaneously
<?php if('12/10/2000' < '10/10/2000') echo "true\n"; else echo "false\n"; $data = date('d/m/Y'); print_r($data); echo "\n"; $data1 = DateTime::createFromFormat('d/m/Y', $data); $data2 = DateTime::createFromFormat('d/m/Y', $data); echo $data1 == $data2->add(new DateInterval('P1D')) ? "iguais\n" : "diferentes\n"; $arr = array(array(), array()); print_r($arr); if(empty($arr)) echo "empty\n"; else echo "not empty\n"; $data3 = DateTime::createFromFormat('d/m/Y', '30/30/2000'); print_r($data3->getLastErrors()); print_r(array_sum($data3->getLastErrors()));
Output for git.master, git.master_jit
false 11/12/2013 diferentes Array ( [0] => Array ( ) [1] => Array ( ) ) not empty Array ( [warning_count] => 1 [warnings] => Array ( [10] => The parsed date was invalid ) [error_count] => 0 [errors] => Array ( ) ) 1
Output for rfc.property-hooks
false 11/12/2013 diferentes Array ( [0] => Array ( ) [1] => Array ( ) ) not empty Array ( [warning_count] => 1 [warnings] => Array ( [10] => The parsed date was invalid ) [error_count] => 0 [errors] => Array ( ) ) Warning: array_sum(): Addition is not supported on type array in /in/39eA0 on line 18 Warning: array_sum(): Addition is not supported on type array in /in/39eA0 on line 18 1

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.76 ms | 402 KiB | 8 Q