3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B{ function action(){ $className = mb_strrchr(static::class, "\\"); return $className === false ? '' : mb_substr($className, 1); } } $b = new B(); var_dump($b->action()); $a = new class extends B { }; var_dump($a->action());

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.120.0110.01024.00
8.4.110.0130.00617.97
8.4.100.0090.01118.65
8.4.90.0110.00920.44
8.4.80.0080.00218.78
8.4.70.0120.00817.82
8.4.60.0110.01019.15
8.4.50.0110.00918.61
8.4.40.0140.00717.63
8.4.30.0080.00018.50
8.4.20.0160.00319.47
8.4.10.0030.01319.52
8.3.250.0070.01218.73
8.3.240.0030.00616.91
8.3.230.0090.01116.84
8.3.220.0040.00318.95
8.3.210.0080.01116.69
8.3.200.0110.00816.59
8.3.190.0100.00817.07
8.3.180.0080.00717.23
8.3.170.0090.00920.75
8.3.160.0110.00716.32
8.3.150.0000.00817.25
8.3.140.0160.00016.61
8.3.130.0060.00316.45
8.3.120.0060.01320.57
8.3.110.0040.00416.75
8.3.100.0110.00424.06
8.3.90.0140.00426.77
8.3.80.0070.00319.36
8.3.70.0180.00418.43
8.3.60.0090.00618.30
8.3.50.0130.00424.39
8.3.40.0110.00718.67
8.3.30.0000.01418.29
8.3.20.0000.00724.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0120.00720.54
8.2.280.0110.00718.21
8.2.270.0070.01117.24
8.2.260.0040.00416.82
8.2.250.0040.01118.54
8.2.240.0070.00418.78
8.2.230.0050.00520.94
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0050.00518.88
8.2.190.0060.01016.58
8.2.180.0070.00725.92
8.2.170.0040.01118.91
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0070.00322.03
8.2.100.0090.00317.63
8.2.90.0050.00317.75
8.2.80.0060.00318.87
8.2.70.0060.00617.63
8.2.60.0000.00917.63
8.2.50.0030.00518.05
8.2.40.0000.00718.22
8.2.30.0000.00818.05
8.2.20.0080.00018.06
8.2.10.0000.00719.30
8.2.00.0000.00719.11
8.1.330.0080.01122.13
8.1.320.0030.00516.43
8.1.310.0110.00716.29
8.1.300.0080.00020.27
8.1.290.0080.00630.84
8.1.280.0100.00725.92
8.1.270.0080.00023.99
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00423.96
8.1.230.0040.00817.42
8.1.220.0030.00518.50
8.1.210.0000.00818.77
8.1.200.0030.00717.34
8.1.190.0050.00517.13
8.1.180.0060.00318.10
8.1.170.0000.00718.65
8.1.160.0000.00718.88
8.1.150.0030.00518.88
8.1.140.0070.00018.89
8.1.130.0000.00720.13
8.1.120.0000.00717.42
8.1.110.0080.00017.50
8.1.100.0040.00417.46
8.1.90.0030.00617.46
8.1.80.0040.00417.46
8.1.70.0050.00317.46
8.1.60.0030.00617.67
8.1.50.0040.00417.44
8.1.40.0080.00017.48
8.1.30.0000.00817.68
8.1.20.0050.00317.75
8.1.10.0070.00017.68
8.1.00.0030.00517.46
8.0.300.0040.00418.77
8.0.290.0030.00516.75
8.0.280.0000.00818.50
8.0.270.0040.00417.95
8.0.260.0000.00618.50
8.0.250.0020.00516.98
8.0.240.0020.00516.97
8.0.230.0030.00316.92
8.0.220.0000.00716.96
8.0.210.0040.00416.84
8.0.200.0040.00417.09
8.0.190.0020.00516.98
8.0.180.0040.00417.00
8.0.170.0000.00816.96
8.0.160.0020.00516.94
8.0.150.0000.00716.86
8.0.140.0030.00516.95
8.0.130.0030.00313.47
8.0.120.0080.00016.91
8.0.110.0000.00716.84
8.0.100.0000.00816.95
8.0.90.0040.00417.01
8.0.80.0070.00816.96
8.0.70.0000.00717.01
8.0.60.0000.00816.90
8.0.50.0050.00316.89
8.0.30.0100.00717.08
8.0.20.0150.00517.11
8.0.10.0040.00416.80
8.0.00.0150.00416.73
7.4.330.0050.00015.55
7.4.320.0060.00016.45
7.4.300.0030.00316.62
7.4.290.0040.00416.50
7.4.280.0040.00416.57
7.4.270.0070.00016.61
7.4.260.0050.00013.20
7.4.250.0030.00316.36
7.4.240.0050.00216.52
7.4.230.0040.00416.41
7.4.220.0030.00316.51
7.4.210.0080.00616.54
7.4.200.0000.00716.57
7.4.130.0130.00416.51
7.4.120.0150.00316.50
7.4.110.0120.00916.48
7.4.100.0110.00616.71
7.4.90.0100.00716.59
7.4.80.0100.01219.39
7.4.70.0080.00816.20
7.4.60.0120.00416.48
7.4.50.0030.01416.63
7.4.40.0120.00616.60
7.4.30.0090.00916.66
7.4.20.0090.00616.55
7.4.10.0120.00816.59
7.4.00.0150.00316.71
7.3.330.0030.00416.39
7.3.320.0000.00713.24
7.3.310.0070.00016.39
7.3.300.0030.00316.23
7.3.290.0070.00916.38
7.3.260.0040.01516.37
7.3.240.0100.00916.46
7.3.230.0160.00016.32
7.3.210.0140.00316.57
7.3.200.0060.01016.50
7.3.190.0060.00916.48
7.3.180.0080.01016.27
7.3.170.0060.00916.32
7.3.160.0100.00716.65
7.3.150.0070.01016.72
7.3.140.0090.00616.35
7.3.130.0030.01316.38
7.3.120.0120.00316.54
7.3.110.0040.01216.34
7.3.100.0100.00716.68
7.3.90.0090.00616.54
7.3.80.0080.00816.36
7.3.70.0070.00716.35
7.3.60.0090.00616.46
7.3.50.0080.00816.54
7.3.40.0090.00616.43
7.3.30.0080.00816.26
7.3.20.0090.00716.39
7.3.10.0090.00616.45
7.3.00.0120.00416.30
7.2.330.0100.00716.64
7.2.320.0080.01116.63
7.2.310.0100.00816.44
7.2.300.0070.01116.59
7.2.290.0080.00816.66
7.2.280.0140.00716.80
7.2.270.0080.00816.35
7.2.260.0060.01216.41
7.2.250.0100.00716.45
7.2.240.0060.01016.64
7.2.230.0080.00816.51
7.2.220.0150.00416.53
7.2.210.0160.00316.63
7.2.200.0080.00816.60
7.2.190.0130.00416.58
7.2.180.0060.00916.44
7.2.170.0080.00816.52
7.2.160.0140.00216.48
7.2.150.0060.01016.81
7.2.140.0030.01416.57
7.2.130.0090.00916.51
7.2.120.0100.01016.57
7.2.110.0160.00016.32
7.2.100.0320.00916.32
7.2.90.0080.01116.41
7.2.80.0110.00616.37
7.2.70.0060.01316.25
7.2.60.0070.01016.41
7.2.50.0110.00616.63
7.2.40.0060.01216.36
7.2.30.0110.00816.46
7.2.20.0070.01316.57
7.2.10.0070.01016.51
7.2.00.0080.00816.53

preferences:
29.07 ms | 403 KiB | 5 Q