3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { protected function bar(Int $id){ return $id; } } class Fbar extends Foo { public function bar(String $string) { $int = (Int)$string; return $this->bar($int); } } class FooBar { public function test() { $bar = new Fbar(); $test = $bar->bar('1'); var_dump($test); } } $FooBar = new FooBar; $FooBar->test();

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.0060.00918.43
8.3.50.0120.00316.23
8.3.40.0120.00318.64
8.3.30.0040.01118.59
8.3.20.0080.00018.74
8.3.10.0050.00323.65
8.3.00.0040.00423.53
8.2.180.0060.00916.36
8.2.170.0120.00322.96
8.2.160.0070.00719.14
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00421.13
8.2.110.0100.00020.88
8.2.100.0080.00417.91
8.2.90.0000.00817.78
8.2.80.0080.00017.97
8.2.70.0090.00017.90
8.2.60.0040.00418.09
8.2.50.0000.00818.10
8.2.40.0050.00320.85
8.2.30.0000.00719.17
8.2.20.0040.00417.79
8.2.10.0070.00019.30
8.2.00.0000.00719.29
8.1.280.0120.00625.92
8.1.270.0070.01024.66
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0090.00320.14
8.1.230.0040.00822.48
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0060.00317.10
8.1.180.0060.00318.10
8.1.170.0000.00818.43
8.1.160.0030.00518.75
8.1.150.0080.00018.74
8.1.140.0000.00717.79
8.1.130.0000.00718.94
8.1.120.0000.00717.22
8.1.110.0000.00817.15
8.1.100.0020.00517.34
8.1.90.0050.00317.30
8.1.80.0040.00417.31
8.1.70.0040.00417.32
8.1.60.0050.00317.40
8.1.50.0050.00317.31
8.1.40.0080.00017.21
8.1.30.0050.00517.52
8.1.20.0040.00417.55
8.1.10.0040.00417.38
8.1.00.0040.00417.32
8.0.300.0080.00019.73
8.0.290.0040.00416.58
8.0.280.0000.00718.30
8.0.270.0030.00317.12
8.0.260.0030.00320.06
8.0.250.0030.00316.85
8.0.240.0000.00816.76
8.0.230.0030.00316.86
8.0.220.0000.00816.70
8.0.210.0080.00016.79
8.0.200.0030.00316.93
8.0.190.0050.00316.88
8.0.180.0040.00416.75
8.0.170.0060.00616.89
8.0.160.0040.00416.92
8.0.150.0040.00416.80
8.0.140.0070.00416.80
8.0.130.0050.00013.20
8.0.120.0050.00316.80
8.0.110.0040.00416.72
8.0.100.0000.00916.84
8.0.90.0040.00416.79
8.0.80.0040.01416.77
8.0.70.0040.00416.73
8.0.60.0040.00416.84
8.0.50.0040.00416.91
8.0.30.0100.00817.07
8.0.20.0080.01217.40
8.0.10.0030.00616.99
8.0.00.0120.01016.49
7.4.330.0030.03768.84
7.4.320.0160.02972.14
7.4.300.0200.02372.11
7.4.290.0300.02971.96
7.4.280.0260.02072.04
7.4.270.0300.01772.14
7.4.260.0100.03471.97
7.4.250.0240.02171.96
7.4.240.0230.02371.90
7.4.230.0200.02372.20
7.4.220.0280.01772.12
7.4.210.0650.06572.13
7.4.200.0280.01872.14
7.4.160.0490.04972.01
7.4.140.0700.04672.05
7.4.130.0500.06372.17
7.4.120.0730.05471.95
7.4.110.0680.06171.88
7.4.100.0620.05971.86
7.4.90.0510.05172.12
7.4.80.0650.05272.16
7.4.70.0650.06872.18
7.4.60.0660.03672.05
7.4.50.0240.03771.77
7.4.40.0560.05072.05
7.4.00.0290.02970.60
7.3.330.0390.036121.59
7.3.320.0240.055121.65
7.3.310.0190.02671.71
7.3.300.0270.01771.85
7.3.290.0260.01771.72
7.3.280.0520.04671.72
7.3.260.0690.05571.87
7.3.240.0780.05471.87
7.3.230.0580.07471.91
7.3.210.0680.04971.83
7.3.200.0740.05672.03
7.3.190.0400.06071.99
7.3.180.0410.06471.94
7.3.170.0660.04271.88
7.3.160.0830.06371.73
7.2.330.0580.04972.08
7.2.320.0560.06272.21
7.2.310.0450.06272.04
7.2.300.0730.02672.28
7.2.290.0660.08672.04
7.2.80.6560.04973.73
7.2.70.8100.04075.63
7.2.60.2470.04578.89
7.2.50.0230.03978.72
7.2.40.0300.04978.64
7.2.30.0840.06278.74
7.2.20.0260.04678.63
7.2.10.3020.04777.49
7.2.00.2840.03077.45
7.1.200.1400.03377.72
7.1.191.3510.03977.39
7.1.180.0350.04077.51
7.1.170.0310.06377.53
7.1.160.0100.06277.57
7.1.150.0240.04677.50
7.1.140.1700.06077.43
7.1.130.3090.02977.52
7.1.120.2260.04877.75
7.1.110.1800.04377.62
7.1.100.0680.07177.63
7.1.90.2960.04977.72
7.1.80.2740.04677.58
7.1.70.2370.04477.74
7.1.60.2700.04595.65
7.1.50.2530.05195.90
7.1.40.3880.05995.70
7.1.30.2530.04695.56
7.1.20.3140.04095.70
7.1.10.2570.04677.55
7.1.00.3040.04677.47

preferences:
36.14 ms | 404 KiB | 6 Q