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; $data++; $data = $data + 1; $data+=1; } // Display the data stored in the profiler 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.4.00.0070.01114.95
7.3.120.0040.01114.93
7.3.110.0110.00714.97
7.3.100.0060.00615.08
7.3.90.0030.01014.88
7.3.80.0040.00814.69
7.3.70.0070.01015.04
7.3.60.0060.00615.02
7.3.50.0110.00314.93
7.3.40.0040.01214.54
7.3.30.0070.00714.98
7.3.20.0030.01416.61
7.3.10.0030.01016.71
7.3.00.0120.00316.80
7.2.250.0090.00614.95
7.2.240.0030.01714.80
7.2.230.0030.01015.12
7.2.220.0000.01415.22
7.2.210.0030.01015.14
7.2.200.0060.00915.16
7.2.190.0080.00415.07
7.2.180.0000.01014.95
7.2.170.0060.01014.93
7.2.00.0030.01119.16
7.1.330.0130.00316.00
7.1.320.0070.00715.87
7.1.310.0080.00815.75
7.1.300.0000.01315.89
7.1.290.0060.00915.48
7.1.280.0030.01015.78
7.1.270.0060.00315.71
7.1.260.0040.00815.98
7.1.70.0000.01017.22
7.1.60.0090.01619.43
7.1.50.0000.02117.14
7.1.00.0130.06722.39
7.0.200.0000.00916.47
7.0.140.0100.06721.95
7.0.60.0100.08019.87
7.0.50.0030.06317.98
7.0.40.0070.04020.23
7.0.30.0530.07320.15
7.0.20.0400.07720.08
7.0.10.0100.06020.23
7.0.00.0070.04320.32
5.6.280.0030.07321.09
5.6.210.0100.06720.67
5.6.200.0100.08018.25
5.6.190.0100.04720.45
5.6.180.0400.07720.39
5.6.170.0300.06320.45
5.6.160.0070.04320.54
5.6.150.0070.03718.23
5.6.140.0000.05318.24
5.6.130.0070.05318.19
5.6.120.0070.07321.00
5.6.110.0070.04320.90
5.6.100.0070.07321.01
5.6.90.0000.06020.98
5.6.80.0200.07020.54
5.5.350.0130.07320.30
5.5.340.0100.07317.95
5.5.330.0030.07320.14
5.5.320.0300.07720.36
5.5.310.0130.05720.36
5.5.300.0070.08018.08
5.5.290.0000.04318.05
5.5.280.0200.06720.87
5.5.270.0200.06320.86
5.5.260.0130.08020.76
5.5.250.0230.06020.55
5.5.240.0100.06320.19
5.4.450.0570.05319.61
5.4.440.0600.06019.56
5.4.430.0070.05719.36
5.4.420.0230.07019.63
5.4.410.0100.05718.97
5.4.400.0130.06018.63
5.4.390.0070.05318.53
5.4.380.0200.04318.77
5.4.370.0130.05318.72
5.4.360.0200.04718.71
5.4.350.0110.04412.02
5.4.340.0090.04212.02
5.4.320.0100.04412.50
5.4.310.0090.05212.50
5.4.300.0050.03712.50
5.4.290.0040.04112.50
5.4.280.0050.04212.40
5.4.270.0330.05312.40
5.4.260.0100.05212.40
5.4.250.0110.04612.40
5.4.240.0070.05718.95
5.4.230.0130.07018.79
5.4.220.0100.05318.70
5.4.210.0200.06318.70
5.4.200.0100.05018.69
5.4.190.0100.05018.91
5.4.180.0070.05018.71
5.4.170.0170.04318.68
5.4.160.0070.05018.58
5.4.150.0230.04718.85
5.4.140.0070.05016.57
5.4.130.0070.04716.33
5.4.120.0030.05316.46
5.4.110.0030.05316.28
5.4.100.0070.06316.45
5.4.90.0130.04016.50
5.4.80.0130.04716.43
5.4.70.0070.06016.32
5.4.60.0130.05016.44
5.4.50.0200.05716.38
5.4.40.0070.05016.36
5.4.30.0070.05016.54
5.4.20.0030.05016.57
5.4.10.0070.05316.39
5.4.00.0000.05315.85
5.3.290.0080.03812.80
5.3.280.0000.05314.66
5.3.270.0100.05314.58
5.3.260.0100.04714.83
5.3.250.0100.04714.59
5.3.240.0100.05014.74
5.3.230.0130.04714.50
5.3.220.0100.06314.47
5.3.210.0070.05314.65
5.3.200.0000.05714.57
5.3.190.0030.05314.57
5.3.180.0070.05014.78
5.3.170.0030.06014.55
5.3.160.0030.05314.62
5.3.150.0130.04314.56
5.3.140.0000.05714.64
5.3.130.0130.04714.56
5.3.120.0030.05314.68
5.3.110.0100.07314.63
5.3.100.0000.05714.11
5.3.90.0200.04314.10
5.3.80.0030.05314.03
5.3.70.0130.04314.10
5.3.60.0070.05014.08
5.3.50.0030.05014.03
5.3.40.0000.05713.97
5.3.30.0070.04713.73
5.3.20.0030.05013.91
5.3.10.0000.05313.65
5.3.00.0030.05313.61
5.2.170.0000.04711.21
5.2.160.0000.04311.11
5.2.150.0070.04011.13
5.2.140.0100.03711.30
5.2.130.0100.03311.05
5.2.120.0000.04311.27
5.2.110.0070.03711.10
5.2.100.0030.03711.08
5.2.90.0000.04711.10
5.2.80.0030.04011.08
5.2.70.0100.04011.15
5.2.60.0030.04311.14
5.2.50.0030.04011.10
5.2.40.0000.04311.16
5.2.30.0000.04310.87
5.2.20.0130.03010.91
5.2.10.0130.03010.85
5.2.00.0030.04310.72
5.1.60.0130.0409.90
5.1.50.0030.03310.19
5.1.40.0100.0479.93
5.1.30.0170.04310.47
5.1.20.0030.03710.50
5.1.10.0100.02710.07
5.1.00.0100.0479.96
5.0.50.0030.0278.46
5.0.40.0070.0238.53
5.0.30.0000.0438.25
5.0.20.0070.0208.20
5.0.10.0030.0278.21
5.0.00.0030.0408.08
4.4.90.0000.0235.94
4.4.80.0000.0235.82
4.4.70.0070.0275.89
4.4.60.0000.0235.82
4.4.50.0070.0175.87
4.4.40.0000.0335.93
4.4.30.0070.0275.90
4.4.20.0070.0175.98
4.4.10.0000.0335.89
4.4.00.0070.0305.86
4.3.110.0070.0205.84
4.3.100.0030.0275.83
4.3.90.0100.0105.81
4.3.80.0030.0305.73
4.3.70.0000.0205.78
4.3.60.0000.0205.77
4.3.50.0000.0235.75
4.3.40.0070.0305.72
4.3.30.0070.0235.43
4.3.20.0000.0235.39
4.3.10.0030.0205.39
4.3.00.0000.0236.59

preferences:
40.53 ms | 401 KiB | 5 Q