3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dad { public function early() { print __CLASS__ . PHP_EOL; } public function late() { print get_class($this) . PHP_EOL; } public static function called() { print get_called_class . PHP_EOL; } } class Child extends Dad {} $parent = new Dad(); $child = new Child(); print 'PARENT' . PHP_EOL; $parent->early(); $parent->late(); $parent->called(); print 'CHILD' . PHP_EOL; $child->early(); $child->late(); $child->called();

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.0040.01116.74
8.3.50.0120.00318.25
8.3.40.0090.00918.93
8.3.30.0110.00418.73
8.3.20.0000.00720.52
8.3.10.0040.00423.70
8.3.00.0060.00319.38
8.2.180.0090.00918.41
8.2.170.0090.00622.96
8.2.160.0030.01019.31
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00320.52
8.2.120.0030.00526.35
8.2.110.0090.00020.53
8.2.100.0070.00617.93
8.2.90.0040.00419.23
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0060.00317.79
8.2.50.0050.00318.07
8.2.40.0000.00719.34
8.2.30.0000.00820.70
8.2.20.0040.00417.62
8.2.10.0040.00418.05
8.2.00.0000.00818.05
8.1.280.0060.01025.92
8.1.270.0080.00023.96
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0120.00623.88
8.1.230.0030.00719.01
8.1.220.0030.00517.74
8.1.210.0030.00518.77
8.1.200.0000.00917.35
8.1.190.0050.00317.70
8.1.180.0080.00018.10
8.1.170.0030.00518.50
8.1.160.0040.00421.95
8.1.150.0050.00318.90
8.1.140.0040.00619.49
8.1.130.0000.00717.70
8.1.120.0030.00417.52
8.1.110.0000.00717.47
8.1.100.0060.00317.50
8.1.90.0060.00317.47
8.1.80.0030.00517.34
8.1.70.0080.00017.46
8.1.60.0050.00317.56
8.1.50.0000.00817.43
8.1.40.0040.00417.52
8.1.30.0030.00617.64
8.1.20.0040.00417.60
8.1.10.0040.00417.62
8.1.00.0040.00417.34
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0000.00717.18
8.0.260.0000.00617.26
8.0.250.0070.00016.99
8.0.240.0030.00316.97
8.0.230.0000.00816.89
8.0.220.0050.00216.97
8.0.210.0000.00816.95
8.0.200.0000.00617.04
8.0.190.0030.00616.88
8.0.180.0000.00717.00
8.0.170.0000.00716.99
8.0.160.0000.00716.96
8.0.150.0040.00416.89
8.0.140.0070.00016.82
8.0.130.0030.00313.43
8.0.120.0040.00416.91
8.0.110.0000.00716.86
8.0.100.0050.00316.94
8.0.90.0000.00816.74
8.0.80.0030.01416.91
8.0.70.0020.00516.73
8.0.60.0040.00416.96
8.0.50.0090.00016.85
8.0.30.0050.01417.15
8.0.20.0100.01217.42
8.0.10.0000.00817.06
8.0.00.0080.01016.78
7.4.330.0000.00516.67
7.4.320.0030.00316.61
7.4.300.0030.00316.51
7.4.290.0040.00416.36
7.4.280.0090.00016.64
7.4.270.0030.00316.63
7.4.260.0030.00316.59
7.4.250.0080.00016.59
7.4.240.0070.00016.49
7.4.230.0070.00016.68
7.4.220.0090.01616.53
7.4.210.0070.00716.55
7.4.200.0040.00316.57
7.4.160.0110.00416.65
7.4.150.0170.00017.40
7.4.140.0120.01117.86
7.4.130.0110.00716.60
7.4.120.0110.00816.63
7.4.110.0090.00816.51
7.4.100.0150.00616.40
7.4.90.0100.00716.63
7.4.80.0100.01019.39
7.4.70.0030.01316.42
7.4.60.0070.01516.62
7.4.50.0090.00616.41
7.4.40.0080.00816.52
7.4.30.0150.00716.71
7.4.10.0060.01114.80
7.4.00.0060.00815.01
7.3.330.0030.00513.43
7.3.320.0020.00213.31
7.3.310.0000.00716.26
7.3.300.0060.00016.38
7.3.290.0060.00816.38
7.3.280.0070.00816.38
7.3.270.0140.00317.40
7.3.260.0100.01016.38
7.3.250.0090.01316.38
7.3.240.0070.01316.26
7.3.230.0160.00316.39
7.3.210.0170.00716.36
7.3.200.0140.00716.36
7.3.190.0070.01116.26
7.3.180.0030.01316.40
7.3.170.0100.01016.30
7.3.160.0100.00716.34
7.3.130.0120.00414.62
7.3.120.0100.00614.88
7.3.110.0080.00814.83
7.3.100.0070.01014.86
7.3.90.0080.00314.75
7.3.80.0050.01014.88
7.3.70.0050.00814.74
7.3.60.0070.01014.58
7.3.50.0030.01214.72
7.3.40.0060.00814.80
7.3.30.0080.00714.76
7.3.20.0080.00816.41
7.3.10.0080.00516.66
7.3.00.0100.00316.69
7.2.330.0150.00316.78
7.2.320.0090.00916.61
7.2.310.0070.01016.79
7.2.300.0130.00916.44
7.2.290.0110.01116.43
7.2.260.0040.01214.98
7.2.250.0100.00814.86
7.2.240.0070.01114.92
7.2.230.0070.00714.85
7.2.220.0050.01214.88
7.2.210.0070.01015.04
7.2.200.0060.00514.80
7.2.190.0050.01015.05
7.2.180.0050.01214.98
7.2.170.0020.01114.87
7.2.160.0060.01015.22
7.2.150.0060.01016.58
7.2.140.0070.01416.95
7.2.130.0040.00716.83
7.2.120.0070.01016.63
7.2.110.0060.00916.65
7.2.100.0060.01216.87
7.2.90.0060.00616.85
7.2.80.0040.01116.93
7.2.70.0030.01016.91
7.2.60.0030.00816.86
7.2.50.0090.00616.91
7.2.40.0040.01116.93
7.2.30.0070.00717.00
7.2.20.0070.01316.71
7.2.10.0080.01116.86
7.2.00.0020.01118.17
7.1.330.0070.00715.78
7.1.320.0070.00415.68
7.1.310.0030.01015.69
7.1.300.0120.00315.68
7.1.290.0050.00915.66
7.1.280.0070.00515.76
7.1.270.0070.00515.73
7.1.260.0080.00515.87
7.1.250.0070.00715.62
7.1.240.0070.01015.49
7.1.230.0090.00615.87
7.1.220.0070.01015.68
7.1.210.0080.00415.68
7.1.200.0040.00615.46
7.1.190.0120.00315.70
7.1.180.0070.00715.47
7.1.170.0070.00715.82
7.1.160.0080.00815.43
7.1.150.0040.00715.57
7.1.140.0090.00915.67
7.1.130.0150.00315.67
7.1.120.0120.00615.73
7.1.110.0100.00315.77
7.1.100.0090.00616.56
7.1.90.0030.01015.50
7.1.80.0070.00715.84
7.1.70.0040.00716.24
7.1.60.0130.00717.56
7.1.50.0060.01116.24
7.1.40.0100.00615.71
7.1.30.0070.00315.81
7.1.20.0030.00615.43
7.1.10.0070.00715.47
7.1.00.0080.03819.05
7.0.330.0030.01015.18
7.0.320.0040.00815.07
7.0.310.0030.01315.13
7.0.300.0040.01115.40
7.0.290.0060.00315.16
7.0.280.0060.00315.07
7.0.270.0130.00015.42
7.0.260.0040.00815.02
7.0.250.0060.00615.30
7.0.240.0080.00315.37
7.0.230.0110.00415.14
7.0.220.0030.01015.45
7.0.210.0040.00715.32
7.0.200.0000.01416.08
7.0.190.0060.00615.48
7.0.180.0030.00615.45
7.0.170.0040.01215.38
7.0.160.0060.00615.11
7.0.150.0070.00715.24
7.0.140.0030.01215.44
7.0.130.0040.00415.39
7.0.120.0090.00615.23
7.0.110.0050.00515.41
7.0.100.0040.00815.41
7.0.90.0060.00315.35
7.0.80.0030.00815.45
7.0.70.0100.00315.56
7.0.60.0050.04717.66
7.0.50.0030.03916.71
7.0.40.0070.04216.81
7.0.30.0160.02316.85
7.0.20.0150.04916.71
7.0.10.0100.02216.83
7.0.00.0030.03316.71
5.6.400.0060.00614.26
5.6.390.0000.01613.95
5.6.380.0030.01014.52
5.6.370.0000.01014.23
5.6.360.0090.00014.50
5.6.350.0070.01014.23
5.6.340.0070.00714.07
5.6.330.0070.00714.28
5.6.320.0100.00614.39
5.6.310.0080.00414.13
5.6.300.0060.00914.55
5.6.290.0040.00414.39
5.6.280.0030.02017.55
5.6.270.0110.00014.40
5.6.260.0040.01114.00
5.6.250.0000.01314.30
5.6.240.0050.00514.51
5.6.230.0000.01414.21
5.6.220.0040.01214.21
5.6.210.0050.04817.35
5.6.200.0040.03316.12
5.6.190.0080.04317.32
5.6.180.0250.04217.46
5.6.170.0130.03417.56
5.6.160.0100.02017.44
5.6.150.0020.02716.26
5.6.140.0030.04816.18
5.6.130.0100.02616.06
5.6.120.0050.03817.69
5.6.110.0110.04017.60
5.6.100.0120.04317.74
5.6.90.0070.04717.72
5.6.80.0130.04017.30
5.6.70.0130.00014.43
5.6.60.0040.00414.16
5.6.50.0030.01214.20
5.6.40.0060.01214.11
5.6.30.0030.01213.96
5.6.20.0080.00314.10
5.6.10.0060.00314.46
5.6.00.0000.01314.07
5.5.380.0030.00613.96
5.5.370.0030.01014.36
5.5.360.0100.00714.12
5.5.350.0130.04317.16
5.5.340.0060.03116.03
5.5.330.0100.02017.30
5.5.320.0040.02717.34
5.5.310.0140.04217.16
5.5.300.0050.02416.05
5.5.290.0080.04216.11
5.5.280.0080.03817.38
5.5.270.0050.04917.57
5.5.260.0080.04917.46
5.5.250.0100.01917.34
5.5.240.0120.01817.21
5.5.230.0000.00914.14
5.5.220.0060.00614.26
5.5.210.0100.00714.13
5.5.200.0070.00713.94
5.5.190.0100.00313.98
5.5.180.0030.01014.01
5.5.170.0100.00014.34
5.5.160.0090.00314.16
5.5.150.0110.00313.93
5.5.140.0100.00313.93
5.5.130.0100.00313.89
5.5.120.0070.00714.01
5.5.110.0090.00614.14
5.5.100.0110.00314.15
5.5.90.0000.00814.22
5.5.80.0100.00614.23
5.5.70.0070.00714.39
5.5.60.0090.00014.09
5.5.50.0100.00314.12
5.5.40.0000.01414.41
5.5.30.0000.01414.05
5.5.20.0100.00613.96
5.5.10.0070.00714.26
5.5.00.0070.00713.92

preferences:
46.29 ms | 401 KiB | 5 Q