3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PHPBench { protected static $start_time = 0; protected static $end_time = 0; public static function start() { return self::$start_time = microtime(true); } public static function end() { return self::$end_time = microtime(true); } public function __destruct() { print "Script executed in: " . (float)$time = self::$start_time - self::$end_time; } } // Loop $Bench = new PHPBench(); $Bench::start(); for($x = 0; $x <= 1000000; $x++) { print $x . '<br/>'; } $Bench::end(); ?>

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.100.0720.00714.57
7.2.90.1580.01014.48
7.2.80.0330.00814.70
7.2.70.0690.01014.94
7.2.60.1400.01515.04
7.2.50.1260.00714.91
7.2.40.0680.01214.96
7.2.30.0710.01014.70
7.2.20.1350.00015.05
7.2.10.0230.00614.81
7.2.00.0950.00614.87
7.1.220.1880.01313.69
7.1.210.0510.00213.70
7.1.200.1570.00913.78
7.1.190.1410.00913.45
7.1.180.1600.00013.70
7.1.170.0230.01713.64
7.1.160.0130.02013.72
7.1.150.0220.00613.61
7.1.140.0360.01013.69
7.1.130.1000.01313.73
7.1.120.0180.01813.48
7.1.110.0380.00813.73
7.1.100.0320.00013.86
7.1.90.0610.01913.70
7.1.80.0120.00813.67
7.1.70.0120.02313.64
7.1.60.0370.00931.94
7.1.50.1910.00931.77
7.1.40.2000.01331.75
7.1.30.1360.00831.61
7.1.20.0490.01931.79
7.1.10.0840.00413.54
7.1.00.0670.01213.86
7.0.310.1260.00713.44
7.0.300.0330.01313.51
7.0.290.1210.01213.44
7.0.280.1340.00313.63
7.0.270.0500.00313.44
7.0.260.0250.00813.53
7.0.250.0190.01613.50
7.0.240.0280.00913.72
7.0.230.0320.01613.44
7.0.220.0110.01113.45
7.0.210.0540.00413.63
7.0.200.0780.00813.44
7.0.190.2010.00713.44
7.0.180.1750.01613.52
7.0.170.0160.01313.44
7.0.160.0390.00013.57
7.0.150.0120.01313.66
7.0.140.0590.01213.61
7.0.130.0350.01613.52
7.0.120.0090.01213.58
7.0.110.0310.01113.44
7.0.100.0600.00813.54
7.0.90.0270.01213.56
7.0.80.0300.00713.44
7.0.70.2160.00913.44
7.0.60.1560.01213.44
7.0.50.0520.00613.44
7.0.40.0930.01713.50
7.0.30.0540.02213.54
7.0.20.0260.00513.60
7.0.10.1260.01813.48
7.0.00.0420.00813.64
5.6.380.0070.01814.28
5.6.370.0240.00714.50
5.6.360.0140.00914.28
5.6.350.0130.01214.26
5.6.340.0100.01314.47
5.6.330.0210.01314.64
5.6.320.0100.01414.40
5.6.310.0170.00714.48
5.6.300.0210.01214.55
5.6.290.0260.01814.48
5.6.280.0250.01814.61
5.6.270.0300.01114.36
5.6.260.0290.01014.31
5.6.250.0180.01514.07
5.6.240.0390.01414.33
5.6.230.0210.01514.18
5.6.220.0170.02414.18
5.6.210.0240.01014.32
5.6.200.0200.01314.36
5.6.190.0370.01214.12
5.6.180.0240.02114.27
5.6.170.0250.01614.05
5.6.160.0290.00713.86
5.6.150.0120.01014.53
5.6.140.0190.01513.92
5.6.130.0180.01414.25
5.6.120.0360.02414.46
5.6.110.0200.01614.53
5.6.100.0120.01514.22
5.6.90.0190.00513.98
5.6.80.0080.01214.20
5.6.70.0350.01613.94
5.6.60.0180.00414.14
5.5.380.0140.00713.44
5.5.370.0160.00813.44
5.5.360.0250.01313.44
5.5.350.0160.01313.44
5.5.340.0180.00813.44
5.5.330.0160.02213.44
5.5.320.0220.01313.44
5.5.310.0300.01013.44
5.5.300.0230.00713.44
5.5.290.0230.01613.44
5.5.280.0130.01313.44
5.5.270.0230.01313.44
5.5.260.0180.01913.44
5.5.250.0180.01813.44
5.5.240.0320.00313.44
5.5.230.0110.01113.44
5.5.220.0360.01413.44
5.4.450.0270.01213.44
5.4.440.0200.01413.44
5.4.430.0070.01113.44
5.4.420.0110.01913.44
5.4.410.0140.00713.44
5.4.400.0140.02413.44
5.4.390.0070.01113.44

preferences:
30.92 ms | 401 KiB | 5 Q