3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { $f = function() { return get_called_class(); }; return $f(); } class A { protected $a; public function foo() { echo set_error_handler(function() {}) && get_called_class() && restore_error_handler(); $f = function() { echo a(); }; $f(); } } $a = new A; $a->foo();

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.0140.00718.43
8.3.50.0130.00321.27
8.3.40.0040.01119.00
8.3.30.0100.00320.36
8.3.20.0090.00020.31
8.3.10.0000.00821.96
8.3.00.0070.00022.37
8.2.180.0090.00616.38
8.2.170.0100.00722.96
8.2.160.0090.00620.31
8.2.150.0040.00424.18
8.2.140.0040.01524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.41
8.2.110.0030.00620.94
8.2.100.0060.00617.91
8.2.90.0000.00818.03
8.2.80.0050.00317.97
8.2.70.0000.00817.93
8.2.60.0040.00418.16
8.2.50.0000.00818.10
8.2.40.0040.00418.28
8.2.30.0000.00717.97
8.2.20.0060.00317.63
8.2.10.0090.00017.62
8.2.00.0000.00917.66
8.1.280.0150.00325.92
8.1.270.0060.00320.16
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00024.03
8.1.230.0040.00721.02
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00817.36
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0040.00422.19
8.1.150.0070.00018.54
8.1.140.0000.00817.52
8.1.130.0030.00317.87
8.1.120.0070.00017.41
8.1.110.0000.00717.44
8.1.100.0030.00517.52
8.1.90.0000.00717.37
8.1.80.0040.00417.49
8.1.70.0030.00317.28
8.1.60.0030.00517.48
8.1.50.0000.00817.57
8.1.40.0060.00317.45
8.1.30.0000.00717.64
8.1.20.0030.00617.65
8.1.10.0000.00817.57
8.1.00.0050.00517.50
8.0.300.0070.00019.73
8.0.290.0080.00016.63
8.0.280.0000.00718.49
8.0.270.0000.00717.26
8.0.260.0050.00216.95
8.0.250.0070.00017.06
8.0.240.0000.00717.02
8.0.230.0040.00416.91
8.0.220.0000.00816.85
8.0.210.0000.00717.02
8.0.200.0000.00816.95
8.0.190.0000.00816.93
8.0.180.0000.00816.90
8.0.170.0050.00317.04
8.0.160.0000.00816.90
8.0.150.0080.00016.89
8.0.140.0050.00516.84
8.0.130.0000.00513.35
8.0.120.0000.00716.92
8.0.110.0100.00017.00
8.0.100.0040.00417.02
8.0.90.0000.00716.87
8.0.80.0100.00716.96
8.0.70.0040.00416.76
8.0.60.0040.00417.01
8.0.50.0000.00816.95
8.0.30.0080.01217.12
8.0.20.0080.01017.40
8.0.10.0030.00417.08
8.0.00.0120.00616.56
7.4.330.0030.00315.00
7.4.320.0000.00716.57
7.4.300.0060.00016.52
7.4.290.0030.00316.59
7.4.280.0000.00816.50
7.4.270.0000.00616.52
7.4.260.0030.00316.51
7.4.250.0000.00716.54
7.4.240.0040.00416.53
7.4.230.0070.00016.43
7.4.220.0060.01316.52
7.4.210.0080.00716.52
7.4.200.0000.00716.34
7.4.190.0000.00716.73
7.4.160.0110.00716.54
7.4.150.0180.00317.40
7.4.140.0080.01217.86
7.4.130.0140.00616.58
7.4.120.0120.00716.56
7.4.110.0280.01316.72
7.4.100.0070.01416.52
7.4.90.0160.00716.45
7.4.80.0140.00719.39
7.4.70.0110.00616.58
7.4.60.0060.01216.58
7.4.50.0030.00316.39
7.4.40.0040.01522.77
7.4.30.0120.00616.39
7.4.00.0080.01014.88
7.3.330.0000.00513.34
7.3.320.0030.00313.39
7.3.310.0040.00416.38
7.3.300.0060.00016.24
7.3.290.0080.00516.35
7.3.280.0090.00816.38
7.3.270.0140.00317.40
7.3.260.0100.00716.57
7.3.250.0080.00916.52
7.3.240.0100.00616.48
7.3.230.0090.00916.39
7.3.210.0070.01016.36
7.3.200.0110.00519.39
7.3.190.0150.00616.61
7.3.180.0130.00716.55
7.3.170.0030.01316.44
7.3.160.0130.00716.27
7.3.120.0090.00714.84
7.3.110.0070.01014.86
7.3.100.0060.00614.57
7.3.90.0060.00714.89
7.3.80.0080.00414.72
7.3.70.0030.00614.82
7.3.60.0140.00014.74
7.3.50.0000.00914.85
7.3.40.0120.00314.66
7.3.30.0150.00014.74
7.3.20.0090.00416.72
7.3.10.0070.00716.52
7.3.00.0030.01316.70
7.2.330.0100.01016.65
7.2.320.0140.00316.73
7.2.310.0070.01016.39
7.2.300.0060.01116.44
7.2.290.0110.00516.79
7.2.250.0040.01515.18
7.2.240.0030.01415.25
7.2.230.0030.01015.04
7.2.220.0040.01415.24
7.2.210.0030.00814.92
7.2.200.0000.01315.09
7.2.190.0060.00915.00
7.2.180.0030.01215.02
7.2.170.0030.00714.82
7.2.00.0030.01318.96
7.1.330.0070.00715.41
7.1.320.0070.00715.64
7.1.310.0090.00315.64
7.1.300.0060.01015.73
7.1.290.0060.00915.76
7.1.280.0100.00315.64
7.1.270.0070.00315.52
7.1.260.0030.01015.78
7.1.100.0030.01017.93
7.1.70.0040.00417.07
7.1.60.0000.01519.40
7.1.50.0180.00716.79
7.1.00.0000.07722.40
7.0.200.0050.00516.64
7.0.140.0000.07722.08
7.0.60.0200.08019.90
7.0.50.0000.07017.90
7.0.40.0070.08720.20
7.0.30.0230.04320.11
7.0.20.0330.06020.32
7.0.10.0030.04320.30
7.0.00.0030.04720.44
5.6.280.0070.07021.08
5.6.210.0130.08320.46
5.6.200.0000.05018.29
5.6.190.0100.04020.61
5.6.180.0200.05020.39
5.6.170.0200.08320.51
5.6.160.0100.03720.54
5.6.150.0100.07018.25
5.6.140.0070.07718.23
5.6.130.0070.08018.23
5.6.120.0030.04021.00
5.6.110.0070.04321.02
5.6.100.0130.06020.98
5.6.90.0070.07720.89
5.6.80.0030.06020.30
5.5.350.0030.03720.54
5.5.340.0130.07718.02
5.5.330.0100.04020.40
5.5.320.0370.05020.35
5.5.310.0500.03720.27
5.5.300.0070.07718.01
5.5.290.0030.08318.04
5.5.280.0070.07320.86
5.5.270.0070.06720.77
5.5.260.0070.07720.75
5.5.250.0070.08020.70
5.5.240.0100.05020.20
5.4.450.0330.05019.41
5.4.440.0270.07019.64
5.4.430.0200.04019.32
5.4.420.0170.07719.41
5.4.410.0230.06319.37
5.4.400.0230.05019.07
5.4.390.0200.05019.06
5.4.380.0330.06019.19
5.4.370.0270.07719.08
5.4.360.0270.07319.24
5.4.350.0270.07318.99
5.4.340.0300.05319.07
5.4.320.0370.04018.99
5.4.310.0230.05319.24
5.4.300.0300.06018.94
5.4.290.0270.06719.22
5.4.280.0300.06719.22
5.4.270.0270.04319.06
5.4.260.0230.06019.06
5.4.250.0330.05718.94
5.4.240.0170.08019.25
5.4.230.0200.04719.08
5.4.220.0300.05318.86
5.4.210.0270.04319.03
5.4.200.0270.05019.21
5.4.190.0300.06318.93
5.4.180.0230.03718.98
5.4.170.0200.04019.25
5.4.160.0300.05319.08
5.4.150.0170.05718.83
5.4.140.0270.06316.39
5.4.130.0300.05016.33
5.4.120.0270.03716.39
5.4.110.0130.04316.61
5.4.100.0300.03316.56
5.4.90.0130.04716.59
5.4.80.0270.06316.37
5.4.70.0270.05716.55
5.4.60.0230.06716.43
5.4.50.0200.05016.43
5.4.40.0230.04016.51
5.4.30.0300.06716.37
5.4.20.0300.05316.16
5.4.10.0270.05316.25
5.4.00.0270.03716.11
5.3.290.0270.04716.11
5.3.280.0300.07716.11
5.3.270.0330.05316.11
5.3.260.0300.05716.11
5.3.250.0270.06016.11
5.3.240.0170.06316.11
5.3.230.0200.04716.11
5.3.220.0200.04016.11
5.3.210.0200.04316.11
5.3.200.0200.04016.11
5.3.190.0300.04016.11
5.3.180.0230.06716.11
5.3.170.0270.06716.11
5.3.160.0170.07316.11
5.3.150.0200.07316.11
5.3.140.0130.05016.11
5.3.130.0170.04716.11
5.3.120.0270.07016.11
5.3.110.0230.07316.11
5.3.100.0230.03316.11
5.3.90.0230.07316.11
5.3.80.0230.04316.11
5.3.70.0170.04016.11
5.3.60.0300.05316.11
5.3.50.0270.07016.11
5.3.40.0400.06316.11
5.3.30.0230.06016.11
5.3.20.0200.05316.11
5.3.10.0130.05316.11
5.3.00.0230.07316.11
5.2.170.0300.05016.11
5.2.160.0200.05716.11
5.2.150.0170.05016.11
5.2.140.0200.04316.11
5.2.130.0130.05016.11
5.2.120.0170.04016.11
5.2.110.0270.02716.11
5.2.100.0200.05016.11
5.2.90.0230.05016.11
5.2.80.0200.05716.11
5.2.70.0230.04016.11
5.2.60.0170.06016.11
5.2.50.0200.04316.11
5.2.40.0130.03316.11
5.2.30.0170.06316.11
5.2.20.0230.04016.11
5.2.10.0100.06016.11
5.2.00.0170.05016.11
5.1.60.0170.05316.11
5.1.50.0230.04016.11
5.1.40.0170.05316.11
5.1.30.0200.05716.11
5.1.20.0170.05316.11
5.1.10.0130.05716.11
5.1.00.0230.04016.11
5.0.50.0130.04016.11
5.0.40.0200.05016.11
5.0.30.0100.05316.11
5.0.20.0170.02716.11
5.0.10.0130.03716.11
5.0.00.0070.06716.11
4.4.90.0170.02716.11
4.4.80.0070.03716.11
4.4.70.0070.02316.11
4.4.60.0130.02016.11
4.4.50.0100.03316.11
4.4.40.0100.05016.11
4.4.30.0100.03316.11
4.4.20.0070.02716.11
4.4.10.0070.03316.11
4.4.00.0100.03716.11
4.3.110.0200.02316.11
4.3.100.0030.03716.11
4.3.90.0000.03316.11
4.3.80.0100.04316.11
4.3.70.0030.03716.11
4.3.60.0070.03316.11
4.3.50.0130.03016.11
4.3.40.0070.05316.11
4.3.30.0030.02716.11
4.3.20.0030.02716.11
4.3.10.0100.03016.11
4.3.00.0000.04016.11

preferences:
43.75 ms | 401 KiB | 5 Q