3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Active assert and make it quiet assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_WARNING, 0); assert_options(ASSERT_QUIET_EVAL, 1); // Create a handler function function my_assert_handler($file, $line, $code, $desc = null) { echo "Assertion failed at file $file, line $line, code $code"; if ($desc) { echo ": $desc"; } echo "\n"; } // Set up the callback assert_options(ASSERT_CALLBACK, 'my_assert_handler'); // Make an assertion that should fail assert('2 < 1', 'Testing if two is less than one')

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.110.0230.07716.45
5.4.100.0270.07016.50
5.4.90.0230.07316.48
5.4.80.0230.03316.25
5.4.70.0330.06016.57
5.4.60.0330.06716.43
5.4.50.0430.05016.49
5.4.40.0300.07016.53
5.4.30.0330.06016.53
5.4.20.0370.06316.24
5.4.10.0230.03716.47
5.4.00.0230.04715.95
5.3.210.0370.07015.21
5.3.200.0230.07715.21
5.3.190.0270.07015.21
5.3.180.0270.04715.21
5.3.170.0370.06315.21
5.3.160.0370.06715.21
5.3.150.0370.06015.21
5.3.140.0300.04715.21
5.3.130.0300.03715.21
5.3.120.0200.04315.21
5.3.110.0300.05315.21
5.3.100.0300.07015.21
5.3.90.0270.04015.21
5.3.80.0500.03015.21
5.3.70.0270.07315.21
5.3.60.0370.05015.21
5.3.50.0230.06715.21
5.3.40.0330.03015.21
5.3.30.0330.04315.21
5.3.20.0230.04315.21
5.3.10.0300.03015.21
5.3.00.0270.04015.21

preferences:
141.57 ms | 1386 KiB | 7 Q