3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function printItem($string) { echo 'Foo: ' . $string . PHP_EOL; } public function printPHP() { echo 'PHP is great.' . PHP_EOL; } } class bar extends foo { public function printItem($string) { echo 'Bar: ' . $string . PHP_EOL; echo __CLASS__; } } $foo = new foo(); $bar = new bar(); $foo->printItem('baz'); // Output: 'Foo: baz' $foo->printPHP(); // Output: 'PHP is great' $bar->printItem('baz'); // Output: 'Bar: baz' $bar->printPHP(); // Output: 'PHP is great' ?><?php class foo { public function printItem($string) { echo 'Foo: ' . $string . PHP_EOL; } public function printPHP() { echo 'PHP is great.' . PHP_EOL; } } class bar extends foo { public function printItem($string) { echo 'Bar: ' . $string . PHP_EOL; } } $foo = new foo(); $bar = new bar(); $foo->printItem('baz'); // Output: 'Foo: baz' $foo->printPHP(); // Output: 'PHP is great' $bar->printItem('baz'); // Output: 'Bar: baz' $bar->printPHP(); // Output: 'PHP is great' ?>

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.60.0110.00716.75
8.3.50.0090.01017.46
8.3.40.0100.00618.45
8.3.30.0120.00318.85
8.3.20.0000.00818.69
8.3.10.0000.00920.39
8.3.00.0030.00519.14
8.2.180.0110.00418.26
8.2.170.0040.01122.96
8.2.160.0040.01118.91
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0070.00020.98
8.2.110.0070.00319.35
8.2.100.0080.00417.91
8.2.90.0060.00319.18
8.2.80.0000.00919.25
8.2.70.0060.00317.63
8.2.60.0050.00518.03
8.2.50.0040.00419.12
8.2.40.0050.00318.15
8.2.30.0030.00718.07
8.2.20.0060.00317.82
8.2.10.0040.00417.82
8.2.00.0040.00417.67
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0110.00428.09
8.1.240.0080.00024.01
8.1.230.0080.00320.95
8.1.220.0000.00818.77
8.1.210.0040.00418.85
8.1.200.0090.00017.25
8.1.190.0000.00717.40
8.1.180.0090.00318.10
8.1.170.0060.00318.71
8.1.160.0040.00418.95
8.1.150.0040.00418.72
8.1.140.0030.00517.36
8.1.130.0030.00317.89
8.1.120.0030.00317.49
8.1.110.0070.00317.39
8.1.100.0000.00717.42
8.1.90.0040.00417.38
8.1.80.0000.00717.42
8.1.70.0040.00417.38
8.1.60.0040.00417.47
8.1.50.0040.00417.55
8.1.40.0040.00417.60
8.1.30.0050.00317.51
8.1.20.0000.00817.75
8.1.10.0000.00817.56
8.1.00.0040.00417.55
8.0.300.0030.00519.89
8.0.290.0060.00316.75
8.0.280.0030.00318.40
8.0.270.0000.00717.34
8.0.260.0000.00716.85
8.0.250.0000.00717.07
8.0.240.0060.00416.94
8.0.230.0000.00717.06
8.0.220.0000.00716.91
8.0.210.0020.00517.01
8.0.200.0070.00317.06
8.0.190.0060.00317.06
8.0.180.0040.00417.02
8.0.170.0000.00916.89
8.0.160.0040.00416.97
8.0.150.0000.00816.92
8.0.140.0070.00416.84
8.0.130.0000.00613.49
8.0.120.0030.00616.84
8.0.110.0040.00417.01
8.0.100.0040.00416.90
8.0.90.0040.00417.04
8.0.80.0060.01617.02
8.0.70.0000.00717.04
8.0.60.0020.00516.88
8.0.50.0030.00516.99
8.0.30.0110.01116.93
8.0.20.0050.01416.96
8.0.10.0030.00516.93
8.0.00.0110.00816.89
7.4.330.0050.00013.00
7.4.320.0070.00016.64
7.4.300.0000.00616.63
7.4.290.0000.00716.48
7.4.280.0080.00016.65
7.4.270.0000.00616.61
7.4.260.0000.00613.29
7.4.250.0000.00816.58
7.4.240.0000.00716.69
7.4.230.0030.00316.49
7.4.220.0060.01216.50
7.4.210.0110.00416.65
7.4.200.0040.00416.47
7.4.190.0030.00316.49
7.4.160.0060.00916.75
7.4.150.0070.01316.55
7.4.140.0030.01316.65
7.4.130.0090.01616.88
7.4.120.0130.00416.71
7.4.110.0150.00616.59
7.4.100.0000.01716.66
7.4.90.0110.01016.46
7.4.80.0080.01119.39
7.4.70.0090.00616.58
7.4.60.0080.00816.46
7.4.50.0000.00716.49
7.4.40.0000.01316.65
7.4.30.0060.00916.66
7.4.10.0040.01115.09
7.4.00.0070.01015.15
7.3.330.0030.00313.17
7.3.320.0050.00313.14
7.3.310.0000.00716.22
7.3.300.0060.00016.22
7.3.290.0120.00216.24
7.3.280.0070.01216.21
7.3.270.0100.00716.52
7.3.260.0100.00716.14
7.3.250.0090.00916.33
7.3.240.0030.01416.48
7.3.230.0030.01316.38
7.3.210.0030.01416.21
7.3.200.0000.01616.48
7.3.190.0150.00616.20
7.3.180.0000.01516.26
7.3.170.0060.00916.25
7.3.160.0060.00916.36
7.3.130.0110.00714.52
7.3.120.0070.01114.73
7.3.110.0090.00914.71
7.3.100.0030.01014.84
7.3.90.0040.00714.63
7.3.80.0090.00014.70
7.3.70.0030.01014.84
7.3.60.0000.01714.67
7.3.50.0030.01014.56
7.3.40.0030.00514.50
7.3.30.0090.00614.70
7.3.20.0070.00416.70
7.3.10.0030.00716.66
7.3.00.0060.00616.46
7.2.330.0150.00316.17
7.2.320.0100.01316.56
7.2.310.0090.00916.22
7.2.300.0030.01316.45
7.2.290.0130.00716.57
7.2.260.0040.01514.97
7.2.250.0070.01014.80
7.2.240.0030.01214.91
7.2.230.0000.01215.07
7.2.220.0060.00914.57
7.2.210.0060.00914.62
7.2.200.0120.00614.70
7.2.190.0030.01014.70
7.2.180.0080.00714.85
7.2.170.0090.00614.67
7.2.160.0000.00914.73
7.2.150.0070.01016.66
7.2.140.0030.01216.36
7.2.130.0090.00616.73
7.2.120.0030.01016.58
7.2.110.0070.00716.64
7.2.100.0070.00716.54
7.2.90.0060.00916.79
7.2.80.0000.01316.72
7.2.70.0100.00616.80
7.2.60.0030.00716.88
7.2.50.0040.00916.61
7.2.40.0060.00916.51
7.2.30.0090.00316.70
7.2.20.0030.01316.73
7.2.10.0000.01116.82
7.2.00.0070.00716.71
7.1.330.0060.00915.23
7.1.320.0040.01115.75
7.1.310.0000.01115.68
7.1.300.0060.00615.69
7.1.290.0060.00315.79
7.1.280.0100.00715.50
7.1.270.0030.00715.69
7.1.260.0060.00915.65
7.1.250.0000.00915.54
7.1.240.0040.00815.57
7.1.230.0080.00315.55
7.1.220.0000.00815.34
7.1.210.0060.00915.39
7.1.200.0070.00715.64
7.1.190.0090.00415.34
7.1.180.0070.00715.68
7.1.170.0060.00915.57
7.1.160.0030.01215.50
7.1.150.0060.00915.73
7.1.140.0000.01115.77
7.1.130.0070.00715.70
7.1.120.0040.01115.56
7.1.110.0000.01415.73
7.1.100.0120.00315.75
7.1.90.0000.01415.55
7.1.80.0000.01315.32
7.1.70.0060.00915.65
7.1.60.0040.01115.58
7.1.50.0090.00015.67
7.1.40.0040.00815.72
7.1.30.0070.00715.52
7.1.20.0060.00615.71
7.1.10.0080.00015.44
7.1.00.0070.00715.64
7.0.330.0030.00615.21
7.0.320.0050.00315.27
7.0.310.0040.01015.21
7.0.300.0030.01315.05
7.0.290.0040.00415.22
7.0.280.0090.00615.21
7.0.270.0000.01115.19
7.0.260.0070.00715.18
7.0.250.0100.00614.96
7.0.240.0060.00915.49
7.0.230.0030.00715.26
7.0.220.0040.01115.08
7.0.210.0050.00315.21
7.0.200.0090.00615.21
7.0.190.0030.01015.27
7.0.180.0060.00315.33
7.0.170.0060.00615.04
7.0.160.0080.00615.12
7.0.150.0000.01415.41
7.0.140.0030.01015.27
7.0.130.0000.01315.15
7.0.120.0090.00615.39
7.0.110.0040.00815.11
7.0.100.0030.00615.39
7.0.90.0000.01715.22
7.0.80.0090.00315.38
7.0.70.0070.00415.35
7.0.60.0030.01015.46
7.0.50.0090.00015.20
7.0.40.0070.00713.14
7.0.30.0030.00613.29
7.0.20.0100.00313.36
7.0.10.0090.00613.51
7.0.00.0060.00313.38
5.6.400.0080.00814.41
5.6.390.0040.00414.28
5.6.380.0060.00914.32
5.6.370.0070.00714.13
5.6.360.0070.00713.76
5.6.350.0040.00414.16
5.6.340.0040.01214.04
5.6.330.0040.00414.15
5.6.320.0040.00813.82
5.6.310.0000.01714.44
5.6.300.0090.00614.40
5.6.290.0000.00914.10
5.6.280.0060.00614.05
5.6.270.0030.01114.29
5.6.260.0030.01014.11
5.6.250.0000.01414.30
5.6.240.0070.01013.88
5.6.230.0100.00313.89
5.6.220.0070.00714.22
5.6.210.0030.01014.06
5.6.200.0070.01014.02
5.6.190.0120.00014.09
5.6.180.0000.00814.04
5.6.170.0070.00714.43
5.6.160.0090.00013.88
5.6.150.0090.00314.07
5.6.140.0130.00313.88
5.6.130.0000.00813.88
5.6.120.0030.00513.85
5.6.110.0000.01714.18
5.6.100.0030.01014.16
5.6.90.0030.01013.98
5.6.80.0030.00613.86
5.6.70.0090.00614.30
5.6.60.0090.00614.12
5.6.50.0080.00514.13
5.6.40.0030.00614.10
5.6.30.0070.00713.81
5.6.20.0050.00814.02
5.6.10.0030.01013.91
5.6.00.0080.00313.89
5.5.380.0060.00913.90
5.5.370.0080.00414.28
5.5.360.0060.00614.07
5.5.350.0040.00413.92
5.5.340.0030.00714.03
5.5.330.0090.00613.98
5.5.320.0060.00913.93
5.5.310.0040.00814.04
5.5.300.0040.00813.84
5.5.290.0110.00314.06
5.5.280.0100.00713.69
5.5.270.0070.00713.65
5.5.260.0030.00614.02
5.5.250.0070.00713.82
5.5.240.0060.00314.01
5.5.230.0090.00613.79
5.5.220.0000.01013.62
5.5.210.0000.00813.93
5.5.200.0040.00413.77
5.5.190.0070.00713.93
5.5.180.0120.00313.97
5.5.170.0030.00613.86
5.5.160.0100.00314.12
5.5.150.0030.01414.17
5.5.140.0070.01013.88
5.5.130.0030.00613.59
5.5.120.0070.00714.00
5.5.110.0090.00313.94
5.5.100.0040.01113.98
5.5.90.0100.00314.13
5.5.80.0100.00714.08
5.5.70.0070.00713.75
5.5.60.0070.00314.14
5.5.50.0100.00713.84
5.5.40.0040.01213.99
5.5.30.0050.03015.67
5.5.20.0030.03015.61
5.5.10.0030.04615.65
5.5.00.0050.04315.45
5.4.450.0050.00313.14
5.4.440.0000.01013.14
5.4.430.0030.01013.14
5.4.420.0000.00813.14
5.4.410.0060.00613.14
5.4.400.0030.00813.14
5.4.390.0030.00713.14
5.4.380.0060.00613.14
5.4.370.0090.00313.14
5.4.360.0030.00613.14
5.4.350.0090.00313.14
5.4.340.0030.00313.14
5.4.330.0030.00713.14
5.4.320.0090.00313.14
5.4.310.0050.00513.14
5.4.300.0030.01013.14
5.4.290.0050.00213.14
5.4.280.0000.00913.14
5.4.270.0000.00913.14
5.4.260.0030.00713.14
5.4.250.0110.00013.14
5.4.240.0060.00313.14
5.4.230.0030.00613.14
5.4.220.0030.00813.14
5.4.210.0090.00313.14
5.4.200.0030.00713.14
5.4.190.0050.04316.04
5.4.180.0040.04016.09
5.4.170.0080.03816.13
5.4.160.0080.03816.13
5.4.150.0140.03516.12
5.4.140.0030.03514.85
5.4.130.0050.03814.79
5.4.120.0020.02414.71
5.4.110.0020.03214.80
5.4.100.0060.02214.71
5.4.90.0110.02514.79
5.4.80.0030.02014.78
5.4.70.0050.02814.82
5.4.60.0020.02514.71
5.4.50.0110.03514.78
5.4.40.0060.03814.88
5.4.30.0060.03314.80
5.4.20.0080.03614.77
5.4.10.0030.03214.83
5.4.00.0050.03914.41
5.3.290.0070.00013.14
5.3.280.0070.00313.14
5.3.270.0000.02713.89
5.3.260.0090.04013.90
5.3.250.0080.03613.88
5.3.240.0070.03913.90
5.3.230.0100.03313.89
5.3.220.0080.03813.86
5.3.210.0030.02613.90
5.3.200.0020.04213.87
5.3.190.0050.04313.88
5.3.180.0050.04213.96
5.3.170.0060.04113.87
5.3.160.0050.03713.84
5.3.150.0080.03713.84
5.3.140.0030.04313.88
5.3.130.0040.02413.88
5.3.120.0080.04013.90
5.3.110.0030.04713.96
5.3.100.0080.03313.59
5.3.90.0000.02913.56
5.3.80.0090.03813.61
5.3.70.0080.03713.60
5.3.60.0060.03013.59
5.3.50.0030.02413.54
5.3.40.0100.03713.49
5.3.30.0080.01713.55
5.3.20.0030.02813.37
5.3.10.0030.03813.41
5.3.00.0000.03713.40

preferences:
45.36 ms | 401 KiB | 5 Q