3v4l.org

run code in 300+ PHP versions simultaneously
<?php function profile($dump = FALSE) { static $profile; // Return the times stored in profile, then erase it if ($dump) { $temp = $profile; unset($profile); return ($temp); } $profile[] = microtime(); } // Set up a tick handler register_tick_function("profile"); // Initialize the function before the declare block profile(); // Run a block of code, throw a tick every 2nd statement declare(ticks=1) { $data = 0; ++$data; //15 $data++; //15 $data+=1; //17 $data = $data + 1; //18 } // Display the data stored in the profiler $list = profile (TRUE); $len = count($list); print_r($list); function getTime($time) { list($usec, $sec) = explode(" ", $time); return ((float)$usec + (float)$sec) * 1000000; } for ($i = 1; $i < $len; $i++) { echo getTime($list[$i]) - getTime($list[$i - 1]), PHP_EOL; } //print_r(profile (TRUE));

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)
7.2.00.0070.00319.27
7.1.70.0090.00317.29
7.1.60.0150.00919.43
7.1.50.0080.01116.96
7.1.00.0070.03722.45
7.0.200.0100.00316.85
7.0.140.0030.07022.09
7.0.60.0200.07720.11
7.0.50.0070.03717.92
7.0.40.0170.06320.05
7.0.30.0330.07720.09
7.0.20.0200.08320.06
7.0.10.0400.07320.21
7.0.00.0030.09020.05
5.6.280.0100.06721.11
5.6.210.0130.07720.70
5.6.200.0000.04318.19
5.6.190.0030.08720.55
5.6.180.0270.06320.61
5.6.170.0170.04320.64
5.6.160.0100.07320.50
5.6.150.0030.05318.22
5.6.140.0130.07318.17
5.6.130.0100.05018.18
5.6.120.0100.04321.10
5.6.110.0200.06321.02
5.6.100.0100.07021.09
5.6.90.0230.06720.98
5.6.80.0030.04020.42
5.6.70.0230.04320.54
5.5.350.0130.06720.42
5.5.340.0200.07017.98
5.5.330.0130.08020.41
5.5.320.0170.04320.37
5.5.310.0270.05020.35
5.5.300.0100.07017.95
5.5.290.0130.05318.13
5.5.280.0070.04720.85
5.5.270.0100.08020.62
5.5.260.0130.06720.77
5.5.250.0100.08320.59
5.5.240.0030.04020.12
5.4.450.0530.05319.61
5.4.440.0230.05019.45
5.4.430.0270.05319.70
5.4.420.0230.05319.30
5.4.410.0330.04719.35
5.4.400.1070.06718.84
5.4.390.1370.06718.70
5.4.380.0230.05018.75
5.4.370.0130.06018.47
5.4.360.0300.04318.74
5.4.350.0040.04112.02
5.4.340.0110.04312.02
5.4.320.0060.03712.51
5.4.310.0030.04312.51
5.4.300.0080.03412.51
5.4.290.0080.04912.50
5.4.280.0090.03112.40
5.4.270.0120.04112.41
5.4.260.0070.04312.40
5.4.250.0040.05012.40
5.4.240.0070.05319.06
5.4.230.0030.05719.05
5.4.220.0030.05718.91
5.4.210.0000.06018.71
5.4.200.0130.04718.98
5.4.190.0170.04718.91
5.4.180.0170.04318.69
5.4.170.0070.05718.88
5.4.160.0070.07018.70
5.4.150.0100.05018.91
5.4.140.0100.05316.57
5.4.130.0130.04716.44
5.4.120.0070.04716.61
5.4.110.0000.06016.38
5.4.100.0030.05316.44
5.4.90.0170.05716.46
5.4.80.0070.07016.45
5.4.70.0130.06316.55
5.4.60.0000.05316.34
5.4.50.0070.06316.39
5.4.40.0070.05716.53
5.4.30.0070.04716.48
5.4.20.0100.05316.39
5.4.10.0070.04716.59
5.4.00.0030.05015.99
5.3.290.0080.04512.80
5.3.280.0000.06014.69
5.3.270.0070.05714.59
5.3.260.0100.07314.44
5.3.250.0030.05314.77
5.3.240.0000.06314.60
5.3.230.0100.05014.69
5.3.220.0000.05714.70
5.3.210.0100.04714.71
5.3.200.0030.05314.59
5.3.190.0100.05714.40
5.3.180.0030.06014.63
5.3.170.0130.04014.79
5.3.160.0000.05314.65
5.3.150.0070.05014.79
5.3.140.0100.04714.58
5.3.130.0200.06014.52
5.3.120.0030.05314.69
5.3.110.0000.07014.73
5.3.100.0030.07714.26
5.3.90.0230.03314.16
5.3.80.0070.05013.86
5.3.70.0070.05013.99
5.3.60.0070.05014.02
5.3.50.0170.04013.96
5.3.40.0070.05014.02
5.3.30.0100.04713.99
5.3.20.0030.05013.79
5.3.10.0070.04713.73
5.3.00.0100.04313.64
5.2.170.0070.03711.33
5.2.160.0030.04311.22
5.2.150.0100.03711.24
5.2.140.0100.04011.37
5.2.130.0030.04311.19
5.2.120.0030.04010.96
5.2.110.0030.05711.09
5.2.100.0070.03711.27
5.2.90.0000.06311.26
5.2.80.0030.04311.00
5.2.70.0030.04311.23
5.2.60.0030.04011.07
5.2.50.0070.04711.21
5.2.40.0030.03711.08
5.2.30.0030.04311.07
5.2.20.0100.03711.04
5.2.10.0130.03710.77
5.2.00.0030.04010.80
5.1.60.0100.03010.13
5.1.50.0030.0379.99
5.1.40.0100.03010.20
5.1.30.0030.03310.46
5.1.20.0000.04010.54
5.1.10.0030.03310.11
5.1.00.0030.03310.05
5.0.50.0130.0278.55
5.0.40.0000.0308.38
5.0.30.0000.0438.13
5.0.20.0030.0278.21
5.0.10.0000.0308.25
5.0.00.0030.0408.41
4.4.90.0100.0176.58
4.4.80.0070.0206.58
4.4.70.0070.0276.58
4.4.60.0000.0306.58
4.4.50.0030.0206.57
4.4.40.0070.0306.50
4.4.30.0000.0306.25
4.4.20.0030.0206.25
4.4.10.0100.0136.25
4.4.00.0070.0276.25
4.3.110.0000.0236.25
4.3.100.0030.0206.25
4.3.90.0030.0206.25
4.3.80.0070.0306.25
4.3.70.0030.0206.25
4.3.60.0000.0206.25
4.3.50.0100.0236.25
4.3.40.0030.0406.25
4.3.30.0070.0176.25
4.3.20.0100.0206.25
4.3.10.0030.0276.25
4.3.00.0000.0236.73

preferences:
32.4 ms | 401 KiB | 5 Q