3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = str_replace("/", "", '9/28/2007'); // $edrsession->scheduleDate = substr($date, 4, 4).substr($date, 0, 2).substr($date, 2, 2); echo substr($date, 4, 4).substr($date, 0, 2).substr($date, 2, 2); $test = explode('/','9/28/2007'); if(count($test[0]) < 2){ $test[0] = '0'.$test[0]; } var_dump($test[0]);
Output for git.master, git.master_jit, rfc.property-hooks
0079282 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /in/E1gut:6 Stack trace: #0 {main} thrown in /in/E1gut on line 6
Process exited with code 255.

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:
59.94 ms | 401 KiB | 8 Q