3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __invoke() { echo 'self: ' . self::class . PHP_EOL; echo 'static: ' . static::class . PHP_EOL; echo 'get_class(): ' . get_class() . PHP_EOL; echo 'get_class($this): ' . get_class($this) . PHP_EOL; echo 'get_called_class(): ' . get_called_class() . PHP_EOL; } } class Bar extends Foo { } (new 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.20.0060.01320.49
8.4.10.0090.00022.54
8.3.150.0130.00619.11
8.3.140.0140.00417.10
8.3.130.0080.00318.43
8.3.120.0090.00018.99
8.3.110.0060.00920.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0030.00616.90
8.3.70.0090.00616.75
8.3.60.0090.00618.30
8.3.50.0100.00318.13
8.3.40.0120.00318.83
8.3.30.0180.00418.66
8.3.20.0030.00623.48
8.3.10.0080.00021.90
8.3.00.0040.00722.52
8.2.270.0110.00718.17
8.2.260.0080.00016.43
8.2.250.0030.00616.43
8.2.240.0000.00817.05
8.2.230.0060.00322.58
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0070.00316.75
8.2.190.0120.00916.63
8.2.180.0100.00716.32
8.2.170.0110.00422.96
8.2.160.0070.00720.57
8.2.150.0050.00224.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.96
8.2.110.0140.00719.21
8.2.100.0000.01117.78
8.2.90.0130.00518.31
8.2.80.0060.00318.73
8.2.70.0080.00317.25
8.2.60.0060.00317.80
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0090.00018.03
8.2.20.0040.00418.23
8.2.10.0040.00419.16
8.2.00.0050.00219.17
8.1.310.0000.01518.09
8.1.300.0120.00618.13
8.1.290.0030.00618.88
8.1.280.0200.00025.92
8.1.270.0100.00521.49
8.1.260.0070.01026.35
8.1.250.0000.00828.09
8.1.240.0030.00522.81
8.1.230.0170.00218.84
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0040.00417.13
8.1.190.0000.00817.22
8.1.180.0090.00018.10
8.1.170.0080.00617.92
8.1.160.0060.00518.00
8.1.150.0060.00318.86
8.1.140.0030.00620.79
8.1.130.0000.00717.27
8.1.120.0030.00317.43
8.1.110.0030.00717.30
8.1.100.0040.00517.40
8.1.90.0080.00317.25
8.1.80.0080.00417.39
8.1.70.0090.00317.42
8.1.60.0160.00017.43
8.1.50.0070.00817.46
8.1.40.0100.00517.38
8.1.30.0110.00517.55
8.1.20.0110.00517.52
8.1.10.0110.00417.42
8.1.00.0070.00617.38
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.44
8.0.270.0000.00816.77
8.0.260.0080.00016.82
8.0.250.0000.00716.96
8.0.240.0040.00416.97
8.0.230.0050.00616.94
8.0.220.0040.00816.72
8.0.210.0090.00216.78
8.0.200.0070.00416.89
8.0.190.0050.00616.81
8.0.180.0080.00416.86
8.0.170.0070.00416.82
8.0.160.0060.00516.80
8.0.150.0070.00316.69
8.0.140.0050.00616.63
8.0.130.0070.00515.53
8.0.120.0080.00316.83
8.0.110.0040.00616.82
8.0.100.0090.00316.79
8.0.90.0080.00416.82
8.0.80.0070.00816.83
8.0.70.0090.00316.82
8.0.60.0070.00416.70
8.0.50.0050.00716.74
8.0.30.0050.01016.82
8.0.20.0110.00516.88
8.0.10.0070.00616.85
8.0.00.0070.00616.93
7.4.330.0000.00415.55
7.4.320.0040.00416.30
7.4.300.0060.00416.51
7.4.290.0090.00516.56
7.4.280.0090.00416.51
7.4.270.0060.00616.57
7.4.260.0080.00315.43
7.4.250.0080.00516.42
7.4.240.0070.00516.52
7.4.230.0090.00216.59
7.4.220.0050.00516.33
7.4.210.0070.00816.56
7.4.200.0080.00416.52
7.4.190.0060.00816.61
7.4.180.0090.00416.61
7.4.160.0080.00716.51
7.4.150.0080.00616.40
7.4.140.0110.00416.31
7.4.130.0110.00516.42
7.4.120.0070.00716.39
7.4.110.0100.00416.47
7.4.100.0080.00716.42
7.4.90.0090.00616.38
7.4.80.0060.00817.36
7.4.70.0110.00316.35
7.4.60.0090.00616.45
7.4.50.0090.00416.26
7.4.40.0090.00516.36
7.4.30.0060.00516.28
7.4.20.0060.00416.29
7.4.10.0060.00316.33
7.4.00.0060.00616.00
7.3.330.0100.00416.22
7.3.320.0080.00415.32
7.3.310.0100.00216.27
7.3.300.0080.00416.28
7.3.290.0120.00416.27
7.3.280.0090.00616.16
7.3.270.0100.00516.20
7.3.260.0110.00816.37
7.3.250.0070.00716.23
7.3.240.0100.00716.37
7.3.230.0050.01116.28
7.3.220.0110.00416.17
7.3.210.0100.00716.29
7.3.200.0060.00916.30
7.3.190.0090.00716.18
7.3.180.0070.00816.32
7.3.170.0090.00616.22
7.3.160.0100.00516.22
7.3.150.0100.00516.13
7.3.140.0090.00716.16
7.3.130.0070.00716.21
7.3.120.0110.00415.73
7.3.110.0080.00815.64
7.3.100.0090.00715.43
7.3.90.0070.00615.53
7.3.80.0110.00415.53
7.3.70.0080.00615.33
7.3.60.0080.00715.51
7.3.50.0080.00615.55
7.3.40.0070.00515.48
7.3.30.0120.00315.56
7.3.20.0070.00816.92
7.3.10.0110.00416.91
7.3.00.0090.00716.89
7.2.340.0090.00616.29
7.2.330.0110.00516.43
7.2.320.0120.00516.34
7.2.310.0080.00716.34
7.2.300.0130.00516.39
7.2.290.0110.00716.32
7.2.280.0120.00316.20
7.2.270.0090.00616.22
7.2.260.0090.00716.16
7.2.250.0110.00316.27
7.2.240.0100.00516.16
7.2.230.0060.00915.53
7.2.220.0090.00915.55
7.2.210.0110.00615.67
7.2.200.0120.00415.71
7.2.190.0080.00815.73
7.2.180.0070.00815.73
7.2.170.0070.00915.75
7.2.160.0080.00715.65
7.2.150.0090.00717.17
7.2.140.0090.00517.15
7.2.130.0090.00517.31
7.2.120.0080.00717.15
7.2.110.0090.00517.16
7.2.100.0090.00617.16
7.2.90.0090.00617.15
7.2.80.0090.00617.11
7.2.70.0120.00317.13
7.2.60.0090.00817.13
7.2.50.0070.00817.14
7.2.40.0080.00817.24
7.2.30.0090.00717.14
7.2.20.0060.00917.17
7.2.10.0120.00417.11
7.2.00.0070.00917.20
7.1.330.0090.00617.05
7.1.320.0080.00816.09
7.1.310.0090.00515.97
7.1.300.0110.00315.99
7.1.290.0100.00515.98
7.1.280.0080.00716.06
7.1.270.0070.00815.99
7.1.260.0080.00615.94
7.1.250.0110.00415.99
7.1.240.0120.00417.16
7.1.230.0100.00517.28
7.1.220.0130.00317.33
7.1.210.0110.00417.35
7.1.200.0120.00317.27
7.1.190.0110.00517.25
7.1.180.0140.00217.13
7.1.170.0120.00317.29
7.1.160.0100.00517.11
7.1.150.0120.00417.21
7.1.140.0120.00317.12
7.1.130.0080.00717.26
7.1.120.0110.00417.27
7.1.110.0140.00017.16
7.1.100.0090.00417.12
7.1.90.0130.00117.18
7.1.80.0120.00317.32
7.1.70.0090.00617.16
7.1.60.0120.00417.30
7.1.50.0110.00417.34
7.1.40.0080.00717.30
7.1.30.0130.00117.35
7.1.20.0060.00817.14
7.1.10.0130.00117.26
7.1.00.0120.00217.14
7.0.00.0070.00516.74
5.6.400.0040.00515.79
5.6.260.0050.00616.58
5.5.00.0060.00315.79
5.4.00.0060.00315.79
5.3.00.0030.00415.79
5.2.00.0020.00415.79
5.0.00.0020.00315.79
4.3.110.0010.00215.79

preferences:
29.68 ms | 403 KiB | 5 Q