3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function func() { echo 'I am the parent'; } } class Bar extends Foo { public function func() { echo 'I am the child'; } } // Create instance of child class $bar = new Bar; // Create reflection class $reflected = new ReflectionClass(get_class($bar)); // Get parent method $method = $reflected->getParentClass()->getMethod('func'); // Invoke method on child object $method->invokeArgs($bar, []);

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.4.140.0140.00719.09
8.4.130.0130.00817.45
8.4.120.0120.00820.38
8.4.110.0160.00422.34
8.4.100.0060.00317.73
8.4.90.0130.00817.92
8.4.80.0110.00919.45
8.4.70.0100.00519.39
8.4.60.0120.01020.32
8.4.50.0120.00917.86
8.4.40.0130.00719.20
8.4.30.0100.01017.64
8.4.20.0060.01519.18
8.4.10.0040.00420.53
8.3.270.0110.00916.45
8.3.260.0110.00916.29
8.3.250.0100.00818.70
8.3.240.0090.01217.14
8.3.230.0060.00416.53
8.3.220.0070.01218.51
8.3.210.0140.00616.50
8.3.200.0070.00216.48
8.3.190.0130.00516.88
8.3.180.0050.00616.32
8.3.170.0070.01119.00
8.3.160.0060.00919.17
8.3.150.0080.00018.94
8.3.140.0070.00718.55
8.3.130.0030.00618.60
8.3.120.0130.00718.93
8.3.110.0060.00920.94
8.3.100.0090.00624.06
8.3.90.0040.00426.77
8.3.80.0030.00719.36
8.3.70.0150.00718.30
8.3.60.0140.00418.47
8.3.50.0080.00918.21
8.3.40.0060.00918.67
8.3.30.0120.00318.89
8.3.20.0050.00219.20
8.3.10.0040.00421.90
8.3.00.0040.00417.78
8.2.290.0060.00320.48
8.2.280.0040.00520.23
8.2.270.0070.01117.34
8.2.260.0120.00618.47
8.2.250.0100.00718.44
8.2.240.0060.00317.38
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0070.00718.88
8.2.190.0120.00416.58
8.2.180.0150.00316.63
8.2.170.0070.00722.96
8.2.160.0110.00419.04
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0100.00017.80
8.2.110.0030.00619.31
8.2.100.0000.01117.78
8.2.90.0080.00018.09
8.2.80.0030.00517.97
8.2.70.0030.00617.80
8.2.60.0040.00418.03
8.2.50.0030.00618.10
8.2.40.0050.00219.23
8.2.30.0080.00019.43
8.2.20.0040.00418.05
8.2.10.0020.00517.89
8.2.00.0000.00819.35
8.1.330.0120.00722.02
8.1.320.0070.01216.20
8.1.310.0000.00818.25
8.1.300.0060.00318.41
8.1.290.0090.00030.84
8.1.280.0110.00425.92
8.1.270.0070.00023.72
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0090.00022.24
8.1.230.0080.00419.07
8.1.220.0040.00417.74
8.1.210.0040.00418.91
8.1.200.0060.00317.36
8.1.190.0000.00817.22
8.1.180.0090.00018.10
8.1.170.0050.00318.50
8.1.160.0050.00318.88
8.1.150.0000.00718.86
8.1.140.0050.00317.82
8.1.130.0030.00318.93
8.1.120.0000.00717.38
8.1.110.0040.00417.35
8.1.100.0000.00917.45
8.1.90.0040.00417.35
8.1.80.0040.00417.46
8.1.70.0000.00717.37
8.1.60.0050.00317.56
8.1.50.0000.00817.57
8.1.40.0040.00417.53
8.1.30.0000.01017.68
8.1.20.0080.00017.60
8.1.10.0070.00017.45
8.1.00.0000.00917.54
8.0.300.0000.00720.02
8.0.290.0050.00316.75
8.0.280.0030.00318.32
8.0.270.0030.00316.82
8.0.260.0000.00617.13
8.0.250.0110.00016.82
8.0.240.0040.00616.74
8.0.230.0070.00016.93
8.0.220.0080.00016.92
8.0.210.0000.00716.76
8.0.200.0040.00416.93
8.0.190.0040.00416.91
8.0.180.0050.00316.75
8.0.170.0000.00816.87
8.0.160.0000.00716.87
8.0.150.0040.00416.78
8.0.140.0000.00716.68
8.0.130.0000.00613.29
8.0.120.0050.00216.70
8.0.110.0000.00816.84
8.0.100.0040.00416.86
8.0.90.0040.00416.81
8.0.80.0090.00916.79
8.0.70.0050.00316.75
8.0.60.0000.00816.73
8.0.50.0000.00716.72
8.0.30.0130.00616.98
8.0.20.0090.01017.41
8.0.10.0040.00416.77
8.0.00.0260.01916.69
7.4.330.0000.00515.55
7.4.320.0060.00016.46
7.4.300.0000.00716.59
7.4.290.0070.00016.40
7.4.280.0040.00416.48
7.4.270.0080.00016.49
7.4.260.0080.00016.50
7.4.250.0030.00316.56
7.4.240.0070.00016.43
7.4.230.0000.00716.48
7.4.220.0070.00016.49
7.4.210.0110.00616.64
7.4.200.0070.00016.40
7.4.160.0050.01116.51
7.4.140.0100.00917.86
7.4.130.0140.00716.70
7.4.120.0080.00916.47
7.4.110.0000.01716.38
7.4.100.0080.00816.71
7.4.90.0070.01016.59
7.4.80.0080.01019.39
7.4.70.0070.01016.57
7.4.60.0030.01416.57
7.4.50.0080.00816.54
7.4.40.0140.00916.58
7.4.00.0100.00814.93
7.3.330.0050.00013.36
7.3.320.0000.00613.33
7.3.310.0070.00016.43
7.3.300.0070.00016.25
7.3.290.0000.00716.18
7.3.280.0100.00416.33
7.3.260.0100.01016.34
7.3.240.0050.01216.41
7.3.230.0040.01416.30
7.3.210.0100.00816.22
7.3.200.0130.00316.32
7.3.190.0000.01516.28
7.3.180.0080.00816.59
7.3.170.0060.00916.38
7.3.160.0030.01416.28
7.3.120.0100.01014.60
7.3.110.0100.01014.39
7.3.100.0030.00915.04
7.3.90.0100.00614.73
7.3.80.0000.01514.77
7.3.70.0060.00314.79
7.3.60.0060.00614.63
7.3.50.0090.00614.65
7.3.40.0090.00914.95
7.3.30.0060.00614.84
7.3.20.0090.00616.61
7.3.10.0050.00816.55
7.3.00.0080.00716.66
7.2.330.0100.01016.64
7.2.320.0140.00316.65
7.2.310.0090.01216.71
7.2.300.0030.01316.66
7.2.290.0130.00616.70
7.2.250.0000.02114.87
7.2.240.0080.01214.89
7.2.230.0090.00614.99
7.2.220.0000.01714.82
7.2.210.0120.00314.88
7.2.200.0100.00315.05
7.2.190.0040.01114.82
7.2.180.0110.00714.95
7.2.170.0030.01314.82
7.2.130.0130.00316.92
7.2.120.0030.01016.75
7.2.110.0090.00016.91
7.2.100.0000.00816.94
7.2.90.0100.00316.96
7.2.80.0120.00416.61
7.2.70.0070.00716.89
7.2.60.0050.01016.87
7.2.50.0030.00716.63
7.2.40.0080.00817.53
7.2.30.0070.00817.43
7.2.20.0500.00917.53
7.2.10.0500.00817.48
7.2.00.0930.00717.49
7.1.330.0070.01015.79
7.1.320.0050.00515.56
7.1.310.0110.00715.82
7.1.300.0030.01015.83
7.1.290.0060.01015.89
7.1.280.0000.01615.61
7.1.270.0060.00615.39
7.1.260.0030.01015.45
7.1.250.0060.00315.69
7.1.200.0060.00615.59
7.1.160.0080.01016.84
7.1.150.0080.00916.93
7.1.140.0950.00816.93
7.1.130.1790.01116.85
7.1.120.1600.01016.95
7.1.110.1510.00816.02
7.1.100.0090.00715.91
7.1.90.0260.00816.13
7.1.80.1070.00915.75
7.1.70.0220.00715.15
7.1.60.0300.02033.16
7.1.50.1220.01432.88
7.1.40.0260.01232.55
7.1.30.1770.01332.45
7.1.20.0930.01032.58
7.1.10.1660.00814.66
7.1.00.1800.00814.97

preferences:
39.69 ms | 403 KiB | 5 Q