3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentItem { } class ChildItem extends ParentItem { } class ParentManager { function do_something(ParentItem $item) { } } class ChildManager extends ParentManager { // this is the problem. how do i explain to php that // ChildItem *is* a ParentItem function do_something(ParentItem $item) { } } (new ChildManager())->do_something(new ChildItem);

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.01116.61
8.3.50.0140.00018.04
8.3.40.0110.00418.71
8.3.30.0110.00418.76
8.3.20.0040.00418.57
8.3.10.0040.00421.73
8.3.00.0000.00723.34
8.2.180.0140.00725.92
8.2.170.0100.01022.96
8.2.160.0100.01022.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00021.03
8.2.120.0040.00426.35
8.2.110.0080.00019.27
8.2.100.0080.00417.77
8.2.90.0040.00417.63
8.2.80.0080.00017.97
8.2.70.0060.00317.68
8.2.60.0040.00418.03
8.2.50.0060.00318.10
8.2.40.0080.00020.93
8.2.30.0030.00320.69
8.2.20.0040.00417.94
8.2.10.0000.00717.94
8.2.00.0080.00017.98
8.1.280.0070.01425.92
8.1.270.0080.00020.24
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.01217.23
8.1.230.0070.00419.54
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0040.00417.10
8.1.190.0080.00016.88
8.1.180.0000.00818.10
8.1.170.0050.00318.46
8.1.160.0000.00718.77
8.1.150.0050.00218.71
8.1.140.0070.00018.78
8.1.130.0030.00320.25
8.1.120.0050.00217.36
8.1.110.0000.00717.23
8.1.100.0030.00617.30
8.1.90.0020.00517.34
8.1.80.0000.00817.27
8.1.70.0040.00417.36
8.1.60.0040.00417.41
8.1.50.0000.00917.34
8.1.40.0050.00317.48
8.1.30.0040.00417.62
8.1.20.0040.00417.43
8.1.10.0000.00717.37
8.1.00.0000.00817.38
8.0.300.0050.00318.77
8.0.290.0040.00716.61
8.0.280.0040.00418.35
8.0.270.0000.00717.20
8.0.260.0040.00418.36
8.0.250.0030.00316.96
8.0.240.0030.00316.92
8.0.230.0030.00416.87
8.0.220.0040.00416.84
8.0.210.0030.00316.73
8.0.200.0000.00616.76
8.0.190.0050.00516.79
8.0.180.0040.00416.77
8.0.170.0030.00616.89
8.0.160.0040.00416.73
8.0.150.0030.00316.81
8.0.140.0030.00316.76
8.0.130.0000.00513.24
8.0.120.0070.00016.78
8.0.110.0030.00616.82
8.0.100.0050.00216.66
8.0.90.0000.00816.81
8.0.80.0040.01116.88
8.0.70.0070.00016.75
8.0.60.0080.00016.73
8.0.50.0050.00316.70
8.0.30.0140.00616.95
8.0.20.0130.00617.40
8.0.10.0000.00817.07
8.0.00.0120.00716.85
7.4.330.0000.00515.55
7.4.320.0040.00416.49
7.4.300.0060.00016.47
7.4.290.0000.00716.43
7.4.280.0060.00316.42
7.4.270.0050.00216.43
7.4.260.0090.00016.57
7.4.250.0000.00716.48
7.4.240.0000.00716.54
7.4.230.0030.00316.56
7.4.220.0000.00716.28
7.4.210.0140.00716.49
7.4.200.0030.00316.38
7.4.160.0080.00716.33
7.4.140.0130.00717.86
7.4.130.0130.01016.35
7.4.120.0130.00716.40
7.4.110.0070.01016.34
7.4.100.0140.00316.41
7.4.90.0150.00916.48
7.4.80.0100.00719.39
7.4.70.0100.00716.46
7.4.60.0110.00716.35
7.4.50.0070.00716.31
7.4.40.0030.01316.61
7.4.10.0070.01215.76
7.4.00.0090.00715.46
7.3.330.0030.00313.20
7.3.320.0030.00213.34
7.3.310.0080.00016.33
7.3.300.0000.00716.21
7.3.290.0070.00016.12
7.3.280.0000.01416.23
7.3.260.0080.01016.30
7.3.240.0100.00716.36
7.3.230.0140.00916.29
7.3.210.0070.01016.18
7.3.200.0030.01216.29
7.3.190.0090.00916.37
7.3.180.0060.01016.54
7.3.170.0140.00416.36
7.3.160.0070.01416.13
7.3.130.0050.01415.63
7.3.120.0050.00715.60
7.3.110.0090.00815.70
7.3.100.0080.00815.62
7.3.90.0020.00715.70
7.3.80.0060.00615.59
7.3.70.0080.00615.66
7.3.60.0080.00315.59
7.3.50.0070.00915.59
7.3.40.0030.01315.63
7.3.30.0030.01015.66
7.3.20.0080.00617.25
7.3.10.0120.00216.92
7.3.00.0030.00816.88
7.2.330.0170.00716.60
7.2.320.0080.00816.61
7.2.310.0070.01016.45
7.2.300.0090.00616.24
7.2.290.0100.00716.61
7.2.260.0050.01115.69
7.2.250.0070.01015.81
7.2.240.0150.00015.81
7.2.230.0030.01315.74
7.2.220.0100.00715.69
7.2.210.0010.01415.82
7.2.200.0030.01315.80
7.2.190.0080.00715.79
7.2.180.0070.00915.72
7.2.170.0090.00715.73
7.2.160.0030.00715.70
7.2.150.0110.00517.41
7.2.140.0100.00917.57
7.2.130.0080.00617.34
7.2.120.0060.00717.11
7.2.110.0030.01017.24
7.2.100.0450.01016.61
7.2.90.0320.00716.53
7.2.80.0310.00616.56
7.2.70.0230.00816.60
7.2.60.0450.00816.53
7.2.50.0450.00616.41
7.2.40.0390.00916.72
7.2.30.0050.01016.60
7.2.20.0070.00616.63
7.2.10.0070.00816.45
7.2.00.0050.01116.59
7.1.330.0040.01116.32
7.1.320.0010.00916.46
7.1.310.0090.00316.37
7.1.300.0050.00816.47
7.1.290.0080.00816.41
7.1.280.0040.00716.30
7.1.270.0040.00916.46
7.1.260.0020.01316.45
7.1.250.0070.00515.87
7.1.240.0100.00316.32
7.1.230.0030.00814.57
7.1.220.0240.00615.50
7.1.210.0410.01115.48
7.1.200.0100.00715.54
7.1.190.0450.00615.49
7.1.180.0400.00715.51
7.1.170.0500.00915.60
7.1.160.0440.00815.52
7.1.150.0190.00815.41
7.1.140.0050.00815.44
7.1.130.0100.00815.51
7.1.120.0640.00815.29
7.1.110.0330.01115.46
7.1.100.0130.00715.65
7.1.90.0090.00415.45
7.1.80.0160.00515.32
7.1.70.0170.00615.52
7.1.60.0210.00521.45
7.1.50.0760.00921.44
7.1.40.0900.00721.54
7.1.30.0880.00521.41
7.1.20.0930.01321.49
7.1.10.0830.00715.30
7.1.00.0680.01015.42
7.0.330.0040.00815.98
7.0.320.0080.00816.13
7.0.310.0050.00916.13
7.0.300.0020.01516.00
7.0.290.0020.01016.08
7.0.280.0080.00616.04
7.0.270.0050.00716.14
7.0.260.0050.00716.06
7.0.250.0030.00816.26
7.0.240.0080.00616.24
7.0.230.0020.01016.21
7.0.220.0060.00715.98
7.0.210.0050.00715.99
7.0.200.0070.00315.98
7.0.190.0080.00816.09
7.0.180.0050.00616.12
7.0.170.0020.01216.09
7.0.160.0040.01016.03
7.0.150.0080.00516.06
7.0.140.0090.00616.13
7.0.130.0080.00416.20
7.0.120.0040.00616.07
7.0.110.0040.00916.13
7.0.100.0070.00416.07
7.0.90.0000.01116.03
7.0.80.0030.00916.06
7.0.70.0050.00616.16
7.0.60.0070.00716.09
7.0.50.0050.00716.21
7.0.40.0070.00814.97
7.0.30.0060.00914.94
7.0.20.0080.00714.94
7.0.10.0050.00814.91
7.0.00.0090.00614.91
5.6.400.0060.00815.47
5.6.390.0060.00815.52
5.6.380.0050.00515.09
5.6.370.0020.01115.52
5.6.360.0100.00715.37
5.6.350.0020.01115.45
5.6.340.0080.00315.39
5.6.330.0060.00815.58
5.6.320.0050.00515.40
5.6.310.0050.00715.41
5.6.300.0050.01215.57
5.6.290.0040.00715.49
5.6.280.0080.00515.40
5.6.270.0050.00515.38
5.6.260.0060.00715.34
5.6.250.0020.01215.31
5.6.240.0030.01115.44
5.6.230.0090.00515.46
5.6.220.0050.01015.37
5.6.210.0000.01115.35
5.6.200.0050.00815.35
5.6.190.0060.00915.37
5.6.180.0050.00715.43
5.6.170.0030.01015.29
5.6.160.0030.00915.44
5.6.150.0040.00815.47
5.6.140.0050.00515.40
5.6.130.0050.00815.39
5.6.120.0030.01015.48
5.6.110.0070.00815.40
5.6.100.0100.00415.35
5.6.90.0110.00415.31
5.6.80.0090.00715.47
5.6.70.0020.01215.34
5.6.60.0050.01215.18
5.6.50.0070.00915.34
5.6.40.0050.01215.21
5.6.30.0060.00515.49
5.6.20.0050.00915.49
5.6.10.0020.00815.42
5.6.00.0040.01115.37

preferences:
53.67 ms | 401 KiB | 5 Q