3v4l.org

run code in 300+ PHP versions simultaneously
<?php // more info here: http://ro.php.net/manual/en/function.microtime.php // and here: http://stackoverflow.com/questions/19973037/benchmark-memory-usage-in-php // and an example here: http://3v4l.org/0ifv8 function benchmark(callable $function, $args=null, $count=1) { $time = microtime(TRUE); for($i=0; $i<$count; $i++) { $result = is_array($args)? call_user_func_array($function, $args): call_user_func_array($function); } return array( 'total_time' => microtime(TRUE) - $time, 'average_time' => (microtime(TRUE) - $time)/$count, 'count' => $count ); } function p($string) { print_r($string . "<br>"); } print( benchmark( p('t1'), array('test', 10) ) );

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.10.0100.01015.08
7.4.00.0100.00814.96
7.3.130.0120.00914.71
7.3.120.0030.01514.93
7.3.110.0080.00814.77
7.3.100.0090.00714.82
7.3.90.0060.01114.78
7.3.80.0050.00814.77
7.3.70.0030.01014.85
7.3.60.0080.00614.75
7.3.50.0030.01214.75
7.3.40.0080.00714.67
7.3.30.0030.00714.76
7.3.20.0070.00716.51
7.3.10.0080.00616.76
7.3.00.0050.00716.50
7.2.260.0100.00715.01
7.2.250.0060.01014.94
7.2.240.0070.01014.72
7.2.230.0100.00814.90
7.2.220.0090.00315.03
7.2.210.0040.00814.90
7.2.200.0050.00814.85
7.2.190.0050.00714.87
7.2.180.0060.01214.91
7.2.170.0080.00614.79
7.2.160.0130.00015.11
7.2.150.0000.01016.81
7.2.140.0080.00816.73
7.2.130.0100.00316.82
7.2.120.0000.01716.90
7.2.110.0030.01016.89
7.2.100.0120.00616.89
7.2.90.0070.00716.93
7.2.80.0090.00616.96
7.2.70.0100.00016.69
7.2.60.0060.00616.60
7.2.50.0080.00816.70
7.2.40.0070.00716.70
7.2.30.0030.00816.84
7.2.20.0080.00416.64
7.2.10.0100.00716.82
7.2.00.0070.00718.18
7.1.330.0080.00515.58
7.1.320.0090.00215.64
7.1.310.0070.00715.71
7.1.300.0050.00615.50
7.1.290.0020.01215.72
7.1.280.0030.01215.79
7.1.270.0030.01215.54
7.1.260.0020.01215.54
7.1.250.0040.00815.63
7.1.240.0060.00315.85
7.1.230.0090.00615.78
7.1.220.0120.00015.71
7.1.210.0000.01215.61
7.1.200.0030.01215.76
7.1.190.0030.00915.64
7.1.180.0070.00415.77
7.1.170.0070.00715.52
7.1.160.0040.00815.82
7.1.150.0060.01215.76
7.1.140.0030.00715.80
7.1.130.0100.00315.48
7.1.120.0030.01015.77
7.1.110.0100.00315.50
7.1.100.0030.00915.87
7.1.90.0030.00615.45
7.1.80.0060.01115.59
7.1.70.0050.00616.28
7.1.60.0050.00817.50
7.1.50.0070.01216.33
7.1.40.0060.00315.91
7.1.30.0100.00315.70
7.1.20.0040.00815.64
7.1.10.0090.00615.71
7.1.00.0050.03518.98
7.0.330.0120.00315.42
7.0.320.0040.01115.09
7.0.310.0060.00615.35
7.0.300.0100.00315.22
7.0.290.0000.01015.31
7.0.280.0030.00915.36
7.0.270.0070.00715.33
7.0.260.0110.00315.48
7.0.250.0030.01315.27
7.0.240.0030.00815.38
7.0.230.0070.00715.25
7.0.220.0110.00015.56
7.0.210.0080.00615.05
7.0.200.0030.00515.84
7.0.190.0070.00715.37
7.0.180.0030.00915.29
7.0.170.0040.00715.10
7.0.160.0050.00815.24
7.0.150.0000.01715.41
7.0.140.0070.04018.72
7.0.130.0060.00614.99
7.0.120.0030.01015.17
7.0.110.0040.01115.20
7.0.100.0070.04717.59
7.0.90.0050.04517.53
7.0.80.0180.02517.56
7.0.70.0220.03717.63
7.0.60.0210.04617.50
7.0.50.0230.03717.87
7.0.40.0050.04316.77
7.0.30.0080.04216.77
7.0.20.0040.04516.67
7.0.10.0070.04716.60
7.0.00.0050.02716.71
5.6.400.0030.01013.87
5.6.390.0090.00314.20
5.6.380.0070.00714.63
5.6.370.0090.00614.18
5.6.360.0100.00314.37
5.6.350.0080.00413.98
5.6.340.0080.00814.63
5.6.330.0130.00314.40
5.6.320.0070.00413.87
5.6.310.0070.00314.23
5.6.300.0110.00714.33
5.6.290.0100.00714.32
5.6.280.0080.00013.92
5.6.270.0070.00714.40
5.6.260.0090.00314.28
5.6.250.0050.03517.48
5.6.240.0060.02817.53
5.6.230.0070.04617.25
5.6.220.0110.03817.50
5.6.210.0050.04717.55
5.6.200.0060.04817.73
5.6.190.0050.04117.67
5.6.180.0030.02717.72
5.6.170.0080.04017.69
5.6.160.0100.04217.53
5.6.150.0080.02917.50
5.6.140.0020.04517.54
5.6.130.0120.04017.65
5.6.120.0090.03917.59
5.6.110.0060.04817.52
5.6.100.0160.04017.64
5.6.90.0040.04717.61
5.6.80.0060.03817.31
5.6.70.0080.03617.31
5.6.60.0060.04017.18
5.6.50.0070.04617.20
5.6.40.0070.02317.29
5.6.30.0030.04117.20
5.6.20.0100.04017.20
5.6.10.0030.04517.20
5.6.00.0070.02917.18
5.5.380.0100.04317.38
5.5.370.0080.04217.14
5.5.360.0020.04617.30
5.5.350.0070.03717.35
5.5.340.0130.03717.54
5.5.330.0060.04817.28
5.5.320.0080.04717.47
5.5.310.0080.02017.51
5.5.300.0050.03717.46
5.5.290.0130.04117.56
5.5.280.0060.02717.24
5.5.270.0130.03417.42
5.5.260.0070.04417.62
5.5.250.0120.02717.53
5.5.240.0100.03317.03
5.5.230.0100.03717.08
5.5.220.0080.04217.03
5.5.210.0030.04316.90
5.5.200.0060.04117.09
5.5.190.0050.04416.96
5.5.180.0130.03217.18
5.5.170.0060.00614.21
5.5.160.0120.03817.23
5.5.150.0080.03016.92
5.5.140.0020.05117.01
5.5.130.0070.04417.17
5.5.120.0120.03517.23
5.5.110.0100.02517.13
5.5.100.0030.04517.22
5.5.90.0020.04717.08
5.5.80.0100.04017.08
5.5.70.0050.04217.01
5.5.60.0050.02817.09
5.5.50.0100.04117.13
5.5.40.0030.04517.00
5.5.30.0080.03817.00
5.5.20.0080.03816.94
5.5.10.0090.03417.04
5.5.00.0120.04017.08
5.4.450.0100.03515.28
5.4.440.0060.04115.19
5.4.430.0050.03615.08
5.4.420.0070.02515.13
5.4.410.0080.02615.15
5.4.400.0080.03614.94
5.4.390.0100.03615.09
5.4.380.0040.02715.08
5.4.370.0020.04015.03
5.4.360.0070.04015.06
5.4.350.0050.04315.14
5.4.340.0050.04515.08
5.4.330.0000.01011.08
5.4.320.0030.03714.96
5.4.310.0100.02714.90
5.4.300.0080.04114.93
5.4.290.0110.03614.81
5.4.280.0200.02015.02
5.4.270.0080.03814.98
5.4.260.0060.03815.08
5.4.250.0060.04115.12
5.4.240.0070.04414.90
5.4.230.0070.04014.89
5.4.220.0070.03614.88
5.4.210.0050.04214.88
5.4.200.0050.02314.88
5.4.190.0080.03714.97
5.4.180.0080.03714.86
5.4.170.0110.03614.90
5.4.160.0070.04014.89
5.4.150.0000.04514.75
5.4.140.0040.04213.68
5.4.130.0030.03713.68
5.4.120.0040.02413.52
5.4.110.0080.03213.77
5.4.100.0030.03113.77
5.4.90.0090.02313.59
5.4.80.0070.03813.76
5.4.70.0080.03713.57
5.4.60.0100.03713.78
5.4.50.0070.03713.67
5.4.40.0110.03013.63
5.4.30.0020.04213.77
5.4.20.0040.03113.65
5.4.10.0030.02313.59
5.4.00.0070.04013.22
5.3.290.0040.04412.69
5.3.280.0070.04112.52
5.3.270.0100.03812.63
5.3.260.0050.04312.65
5.3.250.0060.03812.48
5.3.240.0010.04212.46
5.3.230.0050.03412.53
5.3.220.0050.04012.49
5.3.210.0050.02112.43
5.3.200.0060.04112.47
5.3.190.0010.03312.39
5.3.180.0070.04012.55
5.3.170.0080.02812.60
5.3.160.0020.04012.63
5.3.150.0020.04412.54
5.3.140.0050.03712.62
5.3.130.0070.03812.57
5.3.120.0100.03812.61
5.3.110.0030.02812.59
5.3.100.0050.03312.34
5.3.90.0010.04312.25
5.3.80.0100.03212.06
5.3.70.0020.02612.28
5.3.60.0090.02912.20
5.3.50.0070.03712.20
5.3.40.0130.03312.03
5.3.30.0100.01612.19
5.3.20.0020.03112.14
5.3.10.0020.03211.92
5.3.00.0080.03711.96
5.2.170.0000.06711.17
5.2.160.0070.06311.04
5.2.150.0030.05011.04
5.2.140.0070.04711.26
5.2.130.0000.06310.96
5.2.120.0170.05010.99
5.2.110.0030.06311.16
5.2.100.0070.06010.96
5.2.90.0070.05711.00
5.2.80.0030.06311.20
5.2.70.0030.06011.14
5.2.60.0000.07011.11
5.2.50.0000.05711.01
5.2.40.0100.05311.05
5.2.30.0000.04710.99
5.2.20.0030.05710.98
5.2.10.0070.04710.78
5.2.00.0100.04310.58
5.1.60.0070.04710.09
5.1.50.0100.04310.12
5.1.40.0070.0409.81
5.1.30.0100.05010.40
5.1.20.0000.06010.29
5.1.10.0000.03310.18
5.1.00.0070.05010.18
5.0.50.0070.0408.68
5.0.40.0000.0278.41
5.0.30.0030.0578.29
5.0.20.0070.0338.32
5.0.10.0070.0438.18
5.0.00.0000.0678.23
4.4.90.0070.0307.43
4.4.80.0100.0277.43
4.4.70.0030.0377.43
4.4.60.0000.0407.43
4.4.50.0070.0337.43
4.4.40.0070.0477.43
4.4.30.0030.0337.43
4.4.20.0030.0337.43
4.4.10.0000.0237.43
4.4.00.0030.0537.43
4.3.110.0030.0377.43
4.3.100.0030.0177.43
4.3.90.0000.0307.43
4.3.80.0000.0577.43
4.3.70.0030.0337.43
4.3.60.0000.0377.43
4.3.50.0000.0207.43
4.3.40.0000.0337.43
4.3.30.0000.0337.43
4.3.20.0000.0337.43
4.3.10.0000.0307.43
4.3.00.0000.0377.43

preferences:
38.88 ms | 401 KiB | 5 Q