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; 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' ?>

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.0100.01016.75
8.3.50.0100.01016.66
8.3.40.0110.00318.85
8.3.30.0070.00718.63
8.3.20.0030.00618.66
8.3.10.0090.00020.41
8.3.00.0080.00019.26
8.2.180.0140.00716.63
8.2.170.0040.01122.96
8.2.160.0070.00721.07
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0030.00619.77
8.2.110.0050.00520.75
8.2.100.0070.00417.97
8.2.90.0040.00420.96
8.2.80.0000.00818.05
8.2.70.0060.00317.48
8.2.60.0080.00017.80
8.2.50.0040.00718.07
8.2.40.0000.00817.97
8.2.30.0040.00418.04
8.2.20.0040.00417.63
8.2.10.0090.00017.65
8.2.00.0030.00617.66
8.1.280.0070.00725.92
8.1.270.0120.00624.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0150.00320.73
8.1.230.0090.00320.92
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.23
8.1.190.0000.00717.43
8.1.180.0030.00518.10
8.1.170.0000.00718.90
8.1.160.0000.00718.96
8.1.150.0040.00418.58
8.1.140.0000.00817.49
8.1.130.0070.00017.78
8.1.120.0040.00417.52
8.1.110.0000.00717.38
8.1.100.0070.00017.38
8.1.90.0040.00417.48
8.1.80.0000.00717.41
8.1.70.0000.00717.44
8.1.60.0040.00417.56
8.1.50.0040.00417.48
8.1.40.0030.00517.54
8.1.30.0060.00317.63
8.1.20.0000.01217.67
8.1.10.0040.00417.58
8.1.00.0040.00417.61
8.0.300.0000.00819.77
8.0.290.0040.00416.75
8.0.280.0050.00318.50
8.0.270.0040.00417.37
8.0.260.0060.00316.88
8.0.250.0040.00417.08
8.0.240.0040.00717.05
8.0.230.0000.00717.05
8.0.220.0000.00717.00
8.0.210.0030.00316.82
8.0.200.0060.00017.01
8.0.190.0040.00417.05
8.0.180.0000.00816.99
8.0.170.0040.00417.04
8.0.160.0050.00217.08
8.0.150.0000.00816.93
8.0.140.0060.00316.98
8.0.130.0030.00313.49
8.0.120.0040.00416.97
8.0.110.0090.00017.04
8.0.100.0040.00416.88
8.0.90.0040.00416.79
8.0.80.0000.01416.98
8.0.70.0040.00417.05
8.0.60.0000.00816.83
8.0.50.0040.00416.98
8.0.30.0080.01017.16
8.0.20.0110.00817.25
8.0.10.0040.00417.12
8.0.00.0080.01016.85
7.4.330.0000.00513.00
7.4.320.0030.00316.66
7.4.300.0060.00016.66
7.4.290.0030.00316.45
7.4.280.0050.00316.69
7.4.270.0040.00416.54
7.4.260.0000.00613.34
7.4.250.0000.00816.55
7.4.240.0040.00416.58
7.4.230.0000.00716.64
7.4.220.0060.01316.58
7.4.210.0090.00816.65
7.4.200.0040.00416.71
7.4.190.0030.00416.81
7.4.160.0050.01116.61
7.4.150.0100.00716.62
7.4.140.0120.00516.52
7.4.130.0090.00916.70
7.4.120.0050.01116.56
7.4.110.0100.00716.41
7.4.100.0080.00916.49
7.4.90.0090.00916.75
7.4.80.0100.01016.54
7.4.70.0130.00316.40
7.4.60.0120.00516.73
7.4.50.0030.00616.25
7.4.40.0070.00716.54
7.4.30.0040.01216.45
7.3.330.0000.00613.05
7.3.320.0030.00313.07
7.3.310.0000.00716.06
7.3.300.0000.00716.20
7.3.290.0070.00716.21
7.3.280.0090.00716.24
7.3.270.0100.00716.35
7.3.260.0100.00816.26
7.3.250.0100.00916.23
7.3.240.0100.00816.18
7.3.230.0060.01116.17
7.3.210.0070.01016.35
7.3.200.0080.01419.39
7.3.190.0150.00316.40
7.3.180.0090.00616.18
7.3.170.0070.01016.41
7.3.160.0120.00316.23
7.2.330.0070.01316.59
7.2.320.0070.01016.38
7.2.310.0120.00916.40
7.2.300.0160.00016.60
7.2.290.0100.00616.58
5.4.190.0030.05718.96
5.4.180.0070.03719.23
5.4.170.0100.03719.23
5.4.160.0030.04719.22
5.4.150.0100.04719.00
5.4.140.0070.06716.37
5.4.130.0030.03716.37
5.4.120.0100.03716.37
5.4.110.0130.05716.39
5.4.100.0000.05016.48
5.4.90.0030.07316.48
5.4.80.0030.05016.45
5.4.70.0100.04316.70
5.4.60.0070.06716.35
5.4.50.0030.04316.38
5.4.40.0100.06716.47
5.4.30.0200.03316.34
5.4.20.0030.04016.37
5.4.10.0030.03716.39
5.4.00.0070.06715.90
5.3.270.0170.06714.65
5.3.260.0130.06314.76
5.3.250.0070.06314.54
5.3.240.0030.08014.67
5.3.230.0000.04714.66
5.3.220.0070.07314.62
5.3.210.0030.07714.59
5.3.200.0070.03714.63
5.3.190.0030.07314.61
5.3.180.0030.07314.63
5.3.170.0030.05714.64
5.3.160.0100.07314.60
5.3.150.0070.05014.57
5.3.140.0070.07714.74
5.3.130.0070.06314.61
5.3.120.0030.04714.61
5.3.110.0000.04014.71
5.3.100.0170.05314.13
5.3.90.0070.07713.95
5.3.80.0000.07314.08
5.3.70.0030.03714.05
5.3.60.0030.04714.04
5.3.50.0070.04713.91
5.3.40.0100.06013.98
5.3.30.0100.06714.06
5.3.20.0000.05013.70
5.3.10.0070.06313.66
5.3.00.0100.06013.70

preferences:
36.46 ms | 401 KiB | 5 Q