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; $tt = $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.0150.00018.55
8.3.50.0110.01116.57
8.3.40.0120.00318.52
8.3.30.0130.00318.54
8.3.20.0040.00419.03
8.3.10.0040.00421.78
8.3.00.0050.00323.41
8.2.180.0070.00716.63
8.2.170.0040.01122.96
8.2.160.0140.00018.91
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00321.00
8.2.110.0050.00522.13
8.2.100.0110.00017.78
8.2.90.0000.00820.59
8.2.80.0050.00517.97
8.2.70.0000.00817.91
8.2.60.0000.00817.80
8.2.50.0050.00318.07
8.2.40.0090.00018.22
8.2.30.0040.00417.81
8.2.20.0050.00317.91
8.2.10.0000.00719.43
8.2.00.0040.00419.29
8.1.280.0110.00425.92
8.1.270.0000.00821.85
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0090.00320.57
8.1.230.0040.00720.90
8.1.220.0040.00417.74
8.1.210.0030.00618.91
8.1.200.0080.00017.35
8.1.190.0030.00616.97
8.1.180.0000.00918.10
8.1.170.0050.00318.75
8.1.160.0040.00418.73
8.1.150.0040.00418.82
8.1.140.0040.00419.60
8.1.130.0000.00817.33
8.1.120.0040.00317.22
8.1.110.0000.00817.35
8.1.100.0030.00417.34
8.1.90.0050.00317.22
8.1.80.0040.00417.29
8.1.70.0030.00317.29
8.1.60.0090.00017.35
8.1.50.0000.00917.27
8.1.40.0080.00017.27
8.1.30.0040.00417.45
8.1.20.0000.00717.45
8.1.10.0040.00417.35
8.1.00.0040.00417.31
8.0.300.0060.00319.77
8.0.290.0030.00616.58
8.0.280.0070.00018.32
8.0.270.0000.00817.12
8.0.260.0030.00316.74
8.0.250.0060.00016.80
8.0.240.0050.00316.75
8.0.230.0000.00716.82
8.0.220.0000.00816.82
8.0.210.0040.00716.70
8.0.200.0030.00316.88
8.0.190.0050.00216.88
8.0.180.0070.00016.74
8.0.170.0030.00616.80
8.0.160.0030.00616.84
8.0.150.0050.00316.73
8.0.140.0030.00316.71
8.0.130.0000.00613.26
8.0.120.0040.00416.81
8.0.110.0040.00416.80
8.0.100.0070.00016.70
8.0.90.0050.00216.77
8.0.80.0100.01016.79
8.0.70.0040.00416.72
8.0.60.0040.00416.80
8.0.50.0040.00416.84
8.0.30.0130.00816.93
8.0.20.0100.01417.40
8.0.10.0000.00916.82
8.0.00.0060.01116.63
7.4.330.0270.01069.80
7.4.320.0230.01672.11
7.4.300.0230.01771.98
7.4.290.0160.02672.05
7.4.280.0230.02371.85
7.4.270.0240.02072.11
7.4.260.0270.02071.98
7.4.250.0340.01472.07
7.4.240.0190.02271.99
7.4.230.0190.02371.84
7.4.220.0170.02672.01
7.4.210.0460.03872.09
7.4.200.0160.02671.85
7.4.160.0540.03872.00
7.4.140.0670.04971.97
7.4.130.0500.05072.03
7.4.120.0570.05072.12
7.4.110.0630.04372.21
7.4.100.0590.03672.17
7.4.90.0330.06872.12
7.4.80.0530.05772.15
7.4.70.0410.05772.05
7.4.60.0500.06071.99
7.4.50.0520.01672.04
7.4.40.0710.06772.14
7.3.330.0500.020121.36
7.3.320.0410.034121.56
7.3.310.0270.01371.65
7.3.300.0160.02671.82
7.3.290.0140.02571.83
7.3.280.0260.06071.96
7.3.260.0700.04271.87
7.3.240.0520.05571.89
7.3.230.0550.04571.80
7.3.210.0560.04272.02
7.3.200.0610.08471.93
7.3.190.0460.05572.05
7.3.180.0710.03072.05
7.3.170.0550.04671.90
7.3.160.0530.04971.86
7.2.330.0660.07972.27
7.2.320.0560.05372.27
7.2.310.0390.09972.00
7.2.300.0620.04172.12
7.2.290.0740.04772.20
7.2.80.6450.04669.94
7.2.72.4260.03261.68
7.2.62.2720.04961.05
7.2.52.3260.04966.41
7.1.190.7880.05377.54
7.1.182.3480.06267.24
7.1.172.3930.04069.18

preferences:
33.69 ms | 400 KiB | 5 Q