3v4l.org

run code in 300+ PHP versions simultaneously
<?php class First { public function test1() { echo get_called_class(); } public function test2() { print_r(debug_backtrace()); } public function test3() { echo get_class($this); } public function test4() { echo __CLASS__; } public static function test5() { echo get_called_class(); } } function class_alias_kinda($original, $alias) { eval("class $alias extends $original {}"); } class_alias_kinda('First', 'Second'); $aliased = new Second(); $aliased->test1(); // Second $aliased->test2(); // array( 0 => array( ... [object] => Second Object, ... ) ) $aliased->test3(); // Second $aliased->test4(); // First (this is expected) Second::test5(); // Second

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.10.0080.00017.66
8.3.140.0040.00417.16
8.3.130.0080.00018.46
8.3.120.0120.00418.81
8.3.110.0030.00620.94
8.3.100.0060.00318.27
8.3.90.0000.00826.77
8.3.80.0070.00316.38
8.3.70.0120.00316.58
8.3.60.0100.01018.31
8.3.50.0090.00821.14
8.3.40.0120.00618.84
8.3.30.0140.00020.33
8.3.20.0040.00420.29
8.3.10.0050.00322.09
8.3.00.0080.00022.51
8.2.250.0000.00818.46
8.2.240.0120.00318.84
8.2.230.0030.00622.58
8.2.220.0070.00337.54
8.2.210.0090.00026.77
8.2.200.0030.00618.54
8.2.190.0000.01816.75
8.2.180.0070.00725.92
8.2.170.0120.00618.91
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0100.00026.16
8.2.120.0000.00820.87
8.2.110.0050.00521.03
8.2.100.0000.01217.78
8.2.90.0060.00319.34
8.2.80.0050.00317.97
8.2.70.0000.00817.80
8.2.60.0000.00718.16
8.2.50.0040.00418.07
8.2.40.0000.00819.91
8.2.30.0000.00719.45
8.2.20.0000.00717.68
8.2.10.0040.00417.67
8.2.00.0080.00017.63
8.1.300.0060.00319.54
8.1.290.0030.00630.84
8.1.280.0090.00625.92
8.1.270.0040.01124.66
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00319.51
8.1.230.0060.00620.96
8.1.220.0000.00817.74
8.1.210.0030.00518.88
8.1.200.0000.00817.23
8.1.190.0030.00617.13
8.1.180.0000.00818.10
8.1.170.0060.00318.67
8.1.160.0000.00718.91
8.1.150.0040.00418.57
8.1.140.0080.00017.43
8.1.130.0000.00817.86
8.1.120.0000.00817.42
8.1.110.0070.00017.38
8.1.100.0050.00217.39
8.1.90.0000.00717.50
8.1.80.0030.00317.45
8.1.70.0070.00017.45
8.1.60.0000.00817.64
8.1.50.0040.00417.59
8.1.40.0030.00617.61
8.1.30.0030.00517.66
8.1.20.0040.00417.67
8.1.10.0000.00817.49
8.1.00.0070.00317.43
8.0.300.0030.00619.98
8.0.290.0030.00616.75
8.0.280.0070.00018.47
8.0.270.0000.00717.20
8.0.260.0060.00016.92
8.0.250.0050.00216.98
8.0.240.0030.00516.86
8.0.230.0030.00316.91
8.0.220.0000.00716.79
8.0.210.0000.00716.98
8.0.200.0000.00616.93
8.0.190.0040.00416.96
8.0.180.0000.00716.97
8.0.170.0030.00416.96
8.0.160.0000.00716.83
8.0.150.0000.00716.93
8.0.140.0000.00716.91
8.0.130.0000.00613.33
8.0.120.0000.00816.91
8.0.110.0040.00416.91
8.0.100.0050.00316.82
8.0.90.0000.00716.89
8.0.80.0100.00416.89
8.0.70.0080.00016.90
8.0.60.0000.00716.91
8.0.50.0080.00016.94
8.0.30.0100.00816.97
8.0.20.0090.01017.40
8.0.10.0030.00517.09
8.0.00.0100.01116.74
7.4.330.0000.00515.00
7.4.320.0000.00716.63
7.4.300.0060.00016.63
7.4.290.0070.00016.64
7.4.280.0070.00016.47
7.4.270.0000.00716.67
7.4.260.0050.00013.18
7.4.250.0000.00716.43
7.4.240.0040.00316.65
7.4.230.0040.00416.64
7.4.220.0120.00616.67
7.4.210.0060.01116.57
7.4.200.0040.00416.65
7.4.190.0000.00716.79
7.4.160.0130.00316.51
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0110.00616.57
7.4.120.0110.00516.56
7.4.110.0140.00316.49
7.4.100.0060.01016.52
7.4.90.0070.01016.57
7.4.80.0070.01319.39
7.4.70.0130.00616.48
7.4.60.0070.01016.55
7.4.50.0060.00316.40
7.4.40.0080.00822.77
7.4.30.0100.00716.59
7.4.10.0070.01315.04
7.4.00.0060.00914.92
7.3.330.0000.00513.21
7.3.320.0000.00513.36
7.3.310.0080.00016.25
7.3.300.0040.00416.24
7.3.290.0140.00016.41
7.3.280.0090.00816.38
7.3.270.0140.00317.40
7.3.260.0160.00716.44
7.3.250.0120.00816.51
7.3.240.0100.00716.36
7.3.230.0090.00916.64
7.3.210.0080.01116.52
7.3.200.0100.00719.39
7.3.190.0120.00616.54
7.3.180.0030.01216.16
7.3.170.0070.01016.35
7.3.160.0140.00716.48
7.3.130.0030.01214.87
7.3.120.0080.01014.95
7.3.110.0100.01014.88
7.3.100.0070.00714.96
7.3.90.0140.00314.83
7.3.80.0000.01114.82
7.3.70.0100.00314.86
7.3.60.0060.01014.63
7.3.50.0080.00814.81
7.3.40.0070.01014.70
7.3.30.0140.00014.98
7.3.20.0030.01016.57
7.3.10.0060.00316.48
7.3.00.0100.00716.76
7.2.330.0070.01116.50
7.2.320.0830.01116.72
7.2.310.0090.01316.79
7.2.300.0060.01016.64
7.2.290.0000.01716.40
7.2.260.0070.01114.94
7.2.250.0100.00715.30
7.2.240.0110.00714.86
7.2.230.0030.01315.06
7.2.220.0100.00714.86
7.2.210.0140.00015.16
7.2.200.0060.01015.02
7.2.190.0000.01515.11
7.2.180.0060.00614.74
7.2.170.0030.01315.11
7.2.160.0120.00315.01
7.2.150.0100.00617.02
7.2.140.0000.01316.63
7.2.130.0080.00816.76
7.2.120.0030.01516.99
7.2.110.0060.01016.70
7.2.100.0110.00317.01
7.2.90.0000.01116.98
7.2.80.0090.00617.02
7.2.70.0060.00316.86
7.2.60.0050.01116.83
7.2.50.0070.00717.04
7.2.40.0040.00816.83
7.2.30.0090.00617.06
7.2.20.0110.00316.80
7.2.10.0130.00016.94
7.2.00.0090.00916.98
7.1.330.0030.01015.82
7.1.320.0060.01215.70
7.1.310.0070.00716.07
7.1.300.0070.00715.67
7.1.290.0040.00815.59
7.1.280.0100.00315.78
7.1.270.0040.01115.90
7.1.260.0030.00615.86
7.1.250.0100.00715.58
7.1.240.0070.00415.86
7.1.230.0070.00415.93
7.1.220.0030.00615.49
7.1.210.0030.01015.79
7.1.200.0050.00515.86
7.1.190.0120.00315.88
7.1.180.0140.00315.77
7.1.170.0090.00615.78
7.1.160.0080.00315.88
7.1.150.0060.00315.90
7.1.140.0000.01715.59
7.1.130.0060.00615.71
7.1.120.0100.00315.84
7.1.110.0030.01315.79
7.1.100.0100.00415.76
7.1.90.0030.00615.66
7.1.80.0030.01015.94
7.1.70.0030.00716.44
7.1.60.0090.00917.59
7.1.50.0110.00716.54
7.1.40.0080.00615.76
7.1.30.0100.00315.68
7.1.20.0090.00015.88
7.1.10.0030.01015.88
7.1.00.0020.02518.99
7.0.330.0120.00615.48
7.0.320.0060.00915.60
7.0.310.0060.00315.46
7.0.300.0070.00715.33
7.0.290.0030.01315.48
7.0.280.0030.00615.40
7.0.270.0100.00315.36
7.0.260.0060.01215.40
7.0.250.0070.01115.27
7.0.240.0080.00315.57
7.0.230.0040.00815.58
7.0.220.0070.00715.45
7.0.210.0060.00615.45
7.0.200.0050.00516.04
7.0.190.0000.01015.44
7.0.180.0050.00315.34
7.0.170.0130.00315.58
7.0.160.0060.00615.36
7.0.150.0070.00715.47
7.0.140.0020.04518.68
7.0.130.0000.00915.51
7.0.120.0070.01015.21
7.0.110.0030.00615.09
7.0.100.0030.01215.48
7.0.90.0040.01115.53
7.0.80.0070.01015.38
7.0.70.0060.00315.19
7.0.60.0100.04018.62
7.0.50.0070.04416.61
7.0.40.0080.02315.44
7.0.30.0060.03215.64
7.0.20.0080.03815.72
7.0.10.0070.04215.53
7.0.00.0100.02315.63
5.6.400.0120.00614.29
5.6.390.0070.01014.29
5.6.380.0030.01314.43
5.6.370.0070.00714.02
5.6.360.0100.00714.00
5.6.350.0100.00314.50
5.6.340.0070.00714.60
5.6.330.0040.00414.11
5.6.320.0110.00414.00
5.6.310.0060.01214.51
5.6.300.0030.00614.21
5.6.290.0030.00614.57
5.6.280.0030.04217.62
5.6.270.0070.01014.46
5.6.260.0090.00314.25
5.6.250.0030.01414.02
5.6.240.0040.00714.62
5.6.230.0070.00714.07
5.6.220.0000.00914.41
5.6.210.0050.04717.41
5.6.200.0110.03816.43
5.6.190.0080.02716.32
5.6.180.0060.04516.27
5.6.170.0080.04116.30
5.6.160.0050.03516.24
5.6.150.0070.04216.23
5.6.140.0100.03916.21
5.6.130.0090.02116.37
5.6.120.0030.04516.16
5.6.110.0020.03416.31
5.6.100.0070.04016.21
5.6.90.0100.03316.09
5.6.80.0060.04015.83
5.6.70.0040.03015.89
5.6.60.0030.04615.92
5.6.50.0040.03115.89
5.6.40.0070.04315.72
5.6.30.0120.03715.77
5.6.20.0080.02215.99
5.6.10.0120.04015.97
5.6.00.0060.02315.87
5.5.380.0140.00014.30
5.5.370.0030.01014.28
5.5.360.0080.00413.94
5.5.350.2020.02317.30
5.5.340.0150.03716.03
5.5.330.0070.04516.21
5.5.320.0060.03516.13
5.5.310.0090.03816.13
5.5.300.0050.04816.27
5.5.290.0030.03215.96
5.5.280.0070.03415.94
5.5.270.0050.02916.24
5.5.260.0090.04016.25
5.5.250.0090.02516.12
5.5.240.0080.03315.66
5.5.230.0060.04515.87
5.5.220.0080.04015.84
5.5.210.0070.04415.67
5.5.200.0070.04415.79
5.5.190.0070.04215.72
5.5.180.0050.04515.78
5.5.170.0040.01213.95
5.5.160.0030.03915.63
5.5.150.0090.04315.75
5.5.140.0100.03815.78
5.5.130.0100.02615.62
5.5.120.0090.04315.93
5.5.110.0070.03815.71
5.5.100.0070.02515.75
5.5.90.0050.04015.68
5.5.80.0070.03915.75
5.5.70.0120.03515.67
5.5.60.0130.01715.52
5.5.50.0130.03315.69
5.5.40.0040.04515.66
5.5.30.0050.02815.62
5.5.20.0090.04015.59
5.5.10.0050.02915.69
5.5.00.0050.03715.68
5.4.450.0060.02815.29
5.4.440.0020.04115.34
5.4.430.0050.02515.23
5.4.420.0030.04015.25
5.4.410.0060.02115.27
5.4.400.0050.04215.00
5.4.390.0050.02815.07
5.4.380.0100.02014.91
5.4.370.0030.03214.99
5.4.360.0090.02514.92
5.4.350.0080.04215.09
5.4.340.0070.04115.04
5.4.330.0070.00310.97
5.4.320.0100.03514.96
5.4.310.0060.03615.08
5.4.300.0060.04315.07
5.4.290.0080.03715.08
5.4.280.0080.04014.89
5.4.270.0070.03815.00
5.4.260.0050.03915.17
5.4.250.0040.03915.15
5.4.240.0070.03314.93
5.4.230.0070.02115.03
5.4.220.0050.03514.81
5.4.210.0050.04215.08
5.4.200.0030.04714.92
5.4.190.0080.03115.06
5.4.180.0020.03715.00
5.4.170.0030.04215.00
5.4.160.0050.03915.00
5.4.150.0080.03015.06
5.4.140.0080.02713.82
5.4.130.0080.04113.67
5.4.120.0090.03713.77
5.4.110.0100.03813.97
5.4.100.0050.02713.65
5.4.90.0060.04213.79
5.4.80.0030.03213.90
5.4.70.0020.04013.67
5.4.60.0030.04313.73
5.4.50.0070.02713.72
5.4.40.0050.03113.55
5.4.30.0030.04013.60
5.4.20.0100.03513.72
5.4.10.0100.03513.55
5.4.00.0070.02313.44
5.3.290.0070.05314.72
5.3.280.0070.07714.61
5.3.270.0170.06314.68
5.3.260.0130.04714.63
5.3.250.0070.04014.63
5.3.240.0030.06714.65
5.3.230.0030.07014.64
5.3.220.0070.07014.61
5.3.210.0030.06314.43
5.3.200.0070.07714.57
5.3.190.0130.04014.62
5.3.180.0130.07014.79
5.3.170.0130.03714.68
5.3.160.0070.07314.60
5.3.150.0200.06014.79
5.3.140.0130.03314.60
5.3.130.0100.04014.58
5.3.120.0130.04314.52
5.3.110.0000.07314.61
5.3.100.0100.04314.14
5.3.90.0000.08013.99
5.3.80.0030.04713.92
5.3.70.0070.03714.08
5.3.60.0100.03713.86
5.3.50.0000.04714.01
5.3.40.0000.05313.99
5.3.30.0030.07314.15
5.3.20.0030.06013.60
5.3.10.0130.06313.51
5.3.00.0030.05313.71
5.2.170.0100.03311.20
5.2.160.0000.04011.12
5.2.150.0030.04011.15
5.2.140.0000.06711.05
5.2.130.0030.05311.14
5.2.120.0070.05711.11
5.2.110.0000.06711.11
5.2.100.0000.04310.96
5.2.90.0030.06311.12
5.2.80.0070.04011.00
5.2.70.0030.04011.06
5.2.60.0030.04010.91
5.2.50.0100.06011.14
5.2.40.0070.06311.03
5.2.30.0070.05711.02
5.2.20.0030.06010.96
5.2.10.0130.04010.73
5.2.00.0070.06310.72
5.1.60.0030.03310.01
5.1.50.0070.0309.97
5.1.40.0100.0339.99
5.1.30.0000.06710.25
5.1.20.0070.05710.37
5.1.10.0070.03010.13
5.1.00.0000.05710.06
5.0.50.0030.0508.56
5.0.40.0070.0278.40
5.0.30.0030.0378.35
5.0.20.0000.0478.35
5.0.10.0000.0408.35
5.0.00.0070.0538.35
4.4.90.0000.0278.35
4.4.80.0070.0278.35
4.4.70.0000.0378.35
4.4.60.0070.0338.35
4.4.50.0030.0378.35
4.4.40.0000.0308.35
4.4.30.0070.0338.35
4.4.20.0100.0108.35
4.4.10.0070.0338.35
4.4.00.0030.0438.35
4.3.110.0030.0238.35
4.3.100.0030.0378.35
4.3.90.0000.0278.35
4.3.80.0070.0438.35
4.3.70.0030.0338.35
4.3.60.0000.0338.35
4.3.50.0000.0408.35
4.3.40.0000.0478.35
4.3.30.0000.0308.35
4.3.20.0000.0408.35
4.3.10.0000.0338.35
4.3.00.0030.0338.35

preferences:
42.57 ms | 403 KiB | 5 Q