3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static $transport = array(); public function do_stuff() { $test = self::get_transport(); return $test->do_stuff(); } protected static function get_transport(){ $tests = array( 'Test_this', 'Test_that' ); foreach( $tests as $class ) { $result = call_user_func(array($class, 'test')); if ($result) { self::$transport[] = $class; break; } } return new self::$transport[0](); } } class Test_this { public function do_stuff(){ return "this"; } public static function test(){ return false; } } class Test_that { public function do_stuff(){ return "that"; } public static function test(){ return true; } } $a = new Test; var_dump( $a->do_stuff() );

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)
8.3.70.0190.00616.63
8.3.60.0140.00316.88
8.3.50.0080.00822.05
8.3.40.0120.00318.84
8.3.30.0100.00320.38
8.3.20.0030.00520.16
8.3.10.0080.00022.09
8.3.00.0040.00422.15
8.2.180.0150.00318.26
8.2.170.0100.00622.96
8.2.160.0120.00322.12
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0050.00321.02
8.2.110.0090.00022.21
8.2.100.0070.00417.72
8.2.90.0000.00819.27
8.2.80.0040.00419.34
8.2.70.0060.00317.50
8.2.60.0040.00418.04
8.2.50.0040.00818.07
8.2.40.0000.00718.34
8.2.30.0070.00018.05
8.2.20.0060.00317.64
8.2.10.0020.00517.64
8.2.00.0000.01017.64
8.1.280.0100.00725.92
8.1.270.0080.00024.66
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0000.00923.92
8.1.230.0030.00719.20
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0000.00817.25
8.1.190.0030.00517.66
8.1.180.0040.00419.13
8.1.170.0050.00318.59
8.1.160.0000.00820.91
8.1.150.0000.00818.60
8.1.140.0080.00017.47
8.1.130.0030.00317.85
8.1.120.0000.00717.38
8.1.110.0030.00517.46
8.1.100.0000.00817.36
8.1.90.0040.00417.41
8.1.80.0040.00317.38
8.1.70.0000.00717.35
8.1.60.0000.00817.65
8.1.50.0070.00017.46
8.1.40.0040.00417.53
8.1.30.0000.00817.59
8.1.20.0040.00417.68
8.1.10.0000.00817.63
8.1.00.0090.00317.50
8.0.300.0040.00418.77
8.0.290.0000.00717.18
8.0.280.0000.00818.46
8.0.270.0000.00717.34
8.0.260.0030.00316.89
8.0.250.0040.00416.88
8.0.240.0040.00416.85
8.0.230.0030.00316.97
8.0.220.0040.00416.78
8.0.210.0050.00316.79
8.0.200.0030.00617.03
8.0.190.0080.00016.93
8.0.180.0040.00416.82
8.0.170.0000.00816.89
8.0.160.0000.00816.90
8.0.150.0000.00716.81
8.0.140.0040.00316.91
8.0.130.0000.00613.33
8.0.120.0040.00416.84
8.0.110.0040.00416.91
8.0.100.0040.00416.84
8.0.90.0040.00416.89
8.0.80.0090.00916.95
8.0.70.0000.00816.89
8.0.60.0070.00016.73
8.0.50.0040.00416.94
8.0.30.0140.00917.12
8.0.20.0100.00817.40
8.0.10.0040.00416.89
8.0.00.0050.01316.67
7.4.330.0050.00315.00
7.4.320.0000.00616.46
7.4.300.0000.00616.54
7.4.290.0000.00816.50
7.4.280.0000.00816.59
7.4.270.0000.00716.55
7.4.260.0030.00516.57
7.4.250.0040.00416.50
7.4.240.0020.00516.49
7.4.230.0000.00816.27
7.4.220.0130.01016.69
7.4.210.0070.00716.55
7.4.200.0000.00716.50
7.4.190.0030.00516.68
7.4.160.0100.00616.51
7.4.150.0120.01217.40
7.4.140.0100.00817.86
7.4.130.0170.01516.59
7.4.120.0120.00716.52
7.4.110.0110.00616.55
7.4.100.0120.00616.50
7.4.90.0040.01416.56
7.4.80.0130.00719.39
7.4.70.0030.01516.58
7.4.60.0080.00916.55
7.4.50.0000.00816.52
7.4.40.0100.00722.77
7.4.30.0110.00516.55
7.4.00.0070.01115.06
7.3.330.0030.00313.23
7.3.320.0060.00013.37
7.3.310.0030.00316.40
7.3.300.0000.00716.44
7.3.290.0050.00816.30
7.3.280.0100.00816.34
7.3.270.0120.00617.40
7.3.260.0060.01216.29
7.3.250.0050.01316.46
7.3.240.0160.00316.42
7.3.230.0160.00916.39
7.3.210.0070.01016.48
7.3.200.0080.01119.39
7.3.190.0050.01216.45
7.3.180.0070.01416.59
7.3.170.0110.00616.36
7.3.160.0030.01216.53
7.3.120.0060.00815.01
7.3.110.0070.01014.94
7.3.100.0080.00614.84
7.3.90.0060.01014.92
7.3.80.0070.00815.00
7.3.70.0050.00814.75
7.3.60.0070.00814.70
7.3.50.0050.00514.82
7.3.40.0070.00814.76
7.3.30.0020.01114.79
7.3.20.0070.00416.48
7.3.10.0050.00916.59
7.3.00.0050.01016.68
7.2.330.0030.01416.60
7.2.320.0140.00716.72
7.2.310.0070.01316.82
7.2.300.0130.00316.75
7.2.290.0100.00616.69
7.2.250.0090.00915.23
7.2.240.0090.00915.09
7.2.230.0030.01315.17
7.2.220.0050.00915.18
7.2.210.0070.00815.21
7.2.200.0050.01115.01
7.2.190.0030.01115.12
7.2.180.0070.00715.19
7.2.170.0060.00615.12
7.2.160.0000.01615.11
7.2.150.0060.00317.00
7.2.140.0030.01017.04
7.2.130.0030.01017.07
7.2.120.0030.01016.78
7.2.110.0040.00716.91
7.2.100.0040.01216.91
7.2.90.0030.01217.01
7.2.80.0070.00716.95
7.2.70.0070.01017.04
7.2.60.0000.01617.11
7.2.50.0070.00717.05
7.2.40.0090.00317.16
7.2.30.0060.00916.96
7.2.20.0060.00916.98
7.2.10.0070.00317.02
7.2.00.0080.00718.08
7.1.330.0060.00615.67
7.1.320.0060.01015.75
7.1.310.0030.00715.77
7.1.300.0070.00615.97
7.1.290.0050.00715.57
7.1.280.0030.00815.68
7.1.270.0060.00915.88
7.1.260.0070.00715.71
7.1.250.0090.00315.50
7.1.100.0170.00418.18
7.1.70.0000.00817.16
7.1.60.0090.01619.43
7.1.50.0140.00716.84
7.1.00.0030.07722.47
7.0.200.0050.00514.54
7.0.140.0000.07321.95
7.0.70.4900.04019.86
7.0.60.0100.06720.00
7.0.50.0070.08017.98
7.0.40.0070.09320.15
7.0.30.0530.06720.15
7.0.20.0300.08020.11
7.0.10.0170.06020.09
7.0.00.0100.04720.07
5.6.280.0030.06320.91
5.6.210.0130.08020.75
5.6.200.0030.07318.16
5.6.190.0100.05320.57
5.6.180.0230.06720.60
5.6.170.0300.07020.62
5.6.160.0070.04020.57
5.6.150.0000.07018.14
5.6.140.0030.04718.12
5.6.130.0100.07018.12
5.6.120.0170.06721.16
5.6.110.0130.07721.02
5.6.100.0130.07321.02
5.6.90.0100.06021.02
5.6.80.0200.06320.39
5.6.70.0070.08020.38
5.5.350.0030.08320.41
5.5.340.0030.08017.92
5.5.330.0030.06720.43
5.5.320.0070.04020.41
5.5.310.0270.04720.32
5.5.300.0170.07317.96
5.5.290.0030.08717.97
5.5.280.0070.08320.63
5.5.270.0130.07020.81
5.5.260.0070.08720.90
5.5.250.0070.07320.63
5.5.240.0130.07020.05
5.4.450.0470.06719.45
5.4.440.0870.05319.48
5.4.430.1000.05319.33
5.4.420.0600.05019.54
5.4.410.1000.04719.34
5.4.400.0670.05319.15
5.4.390.0800.06019.43
5.4.380.0130.05718.71
5.4.370.0170.03718.56
5.4.360.0030.04018.57
5.4.350.0070.03312.03
5.4.340.0050.03512.02
5.4.320.0030.03912.52
5.4.310.0060.03612.51
5.4.300.0070.05112.51
5.4.290.0100.03712.51
5.4.280.0100.04612.40
5.4.270.0060.03612.40
5.4.260.0060.03612.40
5.4.250.0070.04612.40
5.4.240.0100.05018.95
5.4.230.0000.05718.90
5.4.220.0170.04718.78
5.4.210.0030.05318.72
5.4.200.0100.05019.06
5.4.190.0030.07318.96
5.4.180.0070.05318.94
5.4.170.0070.05318.99
5.4.160.0070.07018.95
5.4.150.0170.04318.91
5.4.140.0070.05016.42
5.4.130.0100.04716.38
5.4.120.0070.05016.49
5.4.110.0170.05716.54
5.4.100.0130.04716.49
5.4.90.0200.04016.41
5.4.80.0200.05716.39
5.4.70.0070.04716.39
5.4.60.0030.05016.38
5.4.50.0130.04016.56
5.4.40.0100.04716.49
5.4.30.0100.04316.41
5.4.20.0030.05316.47
5.4.10.0100.04716.31
5.4.00.0100.04715.96
5.3.290.0060.03912.80
5.3.280.0030.05314.69
5.3.270.0070.05314.61
5.3.260.0100.05314.83
5.3.250.0070.05714.63
5.3.240.0070.05314.60
5.3.230.0030.05714.58
5.3.220.0100.05014.77
5.3.210.0030.06714.76
5.3.200.0030.05314.56
5.3.190.0130.04314.65
5.3.180.0170.03714.59
5.3.170.0070.04714.68
5.3.160.0170.04014.48
5.3.150.0030.05014.65
5.3.140.0070.05014.65
5.3.130.0070.05314.77
5.3.120.0070.05014.62
5.3.110.0070.05014.57
5.3.100.0030.05314.06
5.3.90.0030.05314.11
5.3.80.0070.04714.09
5.3.70.0070.04714.11
5.3.60.0070.05013.91
5.3.50.0000.05313.98
5.3.40.0130.04013.98
5.3.30.0030.04713.89
5.3.20.0030.05013.80
5.3.10.0030.05013.73
5.3.00.0170.03713.73
5.2.170.0100.03711.24
5.2.160.0070.04011.06
5.2.150.0030.04311.23
5.2.140.0030.05011.06
5.2.130.0000.04311.12
5.2.120.0070.03710.94
5.2.110.0000.04311.11
5.2.100.0130.04311.20
5.2.90.0070.03710.94
5.2.80.0200.02711.27
5.2.70.0130.03311.01
5.2.60.0070.04011.14
5.2.50.0070.04311.20
5.2.40.0000.04310.98
5.2.30.0030.04010.89
5.2.20.0070.04711.07
5.2.10.0070.03710.84
5.2.00.0030.04710.73
5.1.60.0030.03310.07
5.1.50.0070.03310.00
5.1.40.0030.03710.03
5.1.30.0030.03710.41
5.1.20.0070.03310.44
5.1.10.0030.03710.23
5.1.00.0000.03710.00
5.0.50.0070.0238.60
5.0.40.0030.0278.49
5.0.30.0070.0508.43
5.0.20.0030.0278.24
5.0.10.0000.0308.38
5.0.00.0070.0378.29
4.4.90.0070.0175.83
4.4.80.0000.0235.92
4.4.70.0100.0135.84
4.4.60.0030.0205.83
4.4.50.0030.0275.86
4.4.40.0000.0335.82
4.4.30.0000.0235.89
4.4.20.0030.0205.90
4.4.10.0070.0175.89
4.4.00.0000.0335.88
4.3.110.0030.0205.79
4.3.100.0070.0175.77
4.3.90.0000.0235.75
4.3.80.0030.0305.82
4.3.70.0030.0205.88
4.3.60.0030.0205.74
4.3.50.0030.0205.77
4.3.40.0000.0435.62
4.3.30.0030.0204.86
4.3.20.0030.0204.86
4.3.10.0030.0204.86
4.3.00.0170.0237.38

preferences:
53.76 ms | 401 KiB | 5 Q