3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo (substr($result, 2)-1); die; $months = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $yes = 0; for ($i = 0; $i < 12; ++$i) { $result = date('m.d.y', strtotime($months[$i])); if (((int)(substr($result, 2)-1) != [$i])) { $correct = "no"; } else { $correct = "yes"; $yes++; } echo $correct . " - " . $result . "\n"; } echo "\n" . $yes . " / 12 correct months."; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $result in /in/U5gGu on line 2 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/U5gGu on line 2 Fatal error: Uncaught TypeError: Unsupported operand types: string - int in /in/U5gGu:2 Stack trace: #0 {main} thrown in /in/U5gGu on line 2
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:
37.8 ms | 401 KiB | 8 Q