3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait SomeTrait { public function __call($method, array $parameters) { // ... return is_callable(['parent', '__call']) ? parent::__call($method, $parameters) : null; } } class GreatParentClass { public function __call($method, array $parameters) { return 'bar'; } } class ParenClassWithoutCall { } class ProxyClass extends GreatParentClass { } class FooClass extends ProxyClass { use SomeTrait; } class BarClass extends GreatParentClass { use SomeTrait; } class BazClass extends ParenClassWithoutCall { use SomeTrait; } class SomeClassWithoutParent { use SomeTrait; } $class = new FooClass(); var_dump($class->foobar()); $class = new BarClass(); var_dump($class->foobar()); $class = new BazClass(); var_dump($class->foobar()); $class = new SomeClassWithoutParent(); var_dump($class->foobar());

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.0140.01017.61
8.4.10.0100.00017.74
8.3.150.0140.00720.70
8.3.140.0160.00318.95
8.3.130.0070.00416.62
8.3.120.0030.00620.60
8.3.110.0040.00720.94
8.3.100.0050.00316.73
8.3.90.0000.00826.77
8.3.80.0030.00619.36
8.3.70.0200.00718.55
8.3.60.0110.01116.63
8.3.50.0140.00721.22
8.3.40.0170.00318.97
8.3.30.0030.01018.88
8.3.20.0080.00020.15
8.3.10.0050.00321.77
8.3.00.0060.00317.46
8.2.270.0120.00617.14
8.2.260.0140.00419.16
8.2.250.0080.00016.90
8.2.240.0070.01119.03
8.2.230.0080.00022.58
8.2.220.0030.00524.06
8.2.210.0080.00026.77
8.2.200.0030.00618.88
8.2.190.0110.01116.92
8.2.180.0070.00718.29
8.2.170.0090.00622.96
8.2.160.0120.00318.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0070.00326.16
8.2.120.0040.00419.64
8.2.110.0070.00319.27
8.2.100.0040.00717.84
8.2.90.0030.00618.99
8.2.80.0040.00417.97
8.2.70.0060.00319.23
8.2.60.0000.00817.93
8.2.50.0000.00818.10
8.2.40.0070.00020.47
8.2.30.0070.00018.07
8.2.20.0030.00517.63
8.2.10.0080.00417.86
8.2.00.0060.00517.82
8.1.310.0090.00616.55
8.1.300.0100.00018.34
8.1.290.0030.00630.84
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0040.00421.95
8.1.230.0130.00020.96
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0040.00417.36
8.1.180.0030.00618.10
8.1.170.0080.00018.59
8.1.160.0060.00322.20
8.1.150.0040.00418.82
8.1.140.0040.00817.38
8.1.130.0100.00418.20
8.1.120.0080.00517.48
8.1.110.0060.00817.40
8.1.100.0100.00517.50
8.1.90.0050.00717.50
8.1.80.0060.00717.55
8.1.70.0060.00617.54
8.1.60.0100.00617.56
8.1.50.0040.00817.59
8.1.40.0040.00817.52
8.1.30.0070.00517.63
8.1.20.0120.00217.57
8.1.10.0060.00617.60
8.1.00.0080.00517.45
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0000.00718.39
8.0.270.0110.00516.82
8.0.260.0060.00517.89
8.0.250.0050.00716.89
8.0.240.0060.00516.80
8.0.230.0080.00416.87
8.0.220.0030.00716.88
8.0.210.0080.00516.83
8.0.200.0110.00216.96
8.0.190.0080.00316.86
8.0.180.0050.00716.86
8.0.170.0040.00616.86
8.0.160.0050.00716.91
8.0.150.0090.00216.79
8.0.140.0080.00416.75
8.0.130.0030.00715.05
8.0.120.0090.00216.79
8.0.110.0060.00516.89
8.0.100.0060.00616.82
8.0.90.0040.00616.77
8.0.80.0080.00916.87
8.0.70.0030.00616.84
8.0.60.0040.00716.77
8.0.50.0060.00516.81
8.0.30.0090.00516.95
8.0.20.0140.00317.23
8.0.10.0080.00516.86
8.0.00.0110.00716.81
7.4.330.0040.00315.70
7.4.320.0070.00416.60
7.4.300.0090.00416.50
7.4.290.0100.00116.56
7.4.280.0070.00516.50
7.4.270.0050.00716.56
7.4.260.0090.00416.41
7.4.250.0080.00416.49
7.4.240.0020.00816.57
7.4.230.0080.00516.61
7.4.220.0090.00716.51
7.4.210.0090.00716.61
7.4.200.0070.00516.60
7.4.190.0100.00516.50
7.4.180.0110.00516.61
7.4.160.0130.00216.53
7.4.150.0140.00316.95
7.4.140.0080.00917.34
7.4.130.0140.00616.45
7.4.120.0100.00916.38
7.4.110.0090.00616.42
7.4.100.0130.00516.54
7.4.90.0100.00716.46
7.4.80.0110.00617.39
7.4.70.0040.01316.46
7.4.60.0110.00516.51
7.4.50.0060.00616.51
7.4.40.0120.00616.46
7.4.30.0120.00516.51
7.4.20.0050.01116.44
7.4.10.0100.01016.53
7.4.00.0090.00816.20
7.3.330.0090.00415.54
7.3.320.0070.00414.77
7.3.310.0050.00516.33
7.3.300.0080.00516.25
7.3.290.0090.00216.29
7.3.280.0070.00816.29
7.3.270.0090.00716.85
7.3.260.0080.00816.35
7.3.250.0060.01116.39
7.3.240.0070.00916.36
7.3.230.0100.00916.33
7.3.220.0080.00916.29
7.3.210.0110.00616.37
7.3.200.0080.01017.31
7.3.190.0100.00616.39
7.3.180.0090.00716.34
7.3.170.0110.00616.31
7.3.160.0080.00716.37
7.3.150.0080.00816.47
7.3.140.0130.00416.22
7.3.130.0070.01316.37
7.3.120.0100.00816.29
7.3.110.0090.00816.27
7.3.100.0070.00916.29
7.3.90.0130.00516.37
7.3.80.0150.00316.33
7.3.70.0110.00516.34
7.3.60.0130.00416.29
7.3.50.0090.00616.00
7.3.40.0080.00915.87
7.3.30.0050.01015.86
7.3.20.0130.00816.86
7.3.10.0080.00716.68
7.3.00.0100.00416.72
7.2.340.0170.00616.43
7.2.330.0150.00716.56
7.2.320.0180.00516.34
7.2.310.0160.00716.56
7.2.300.0160.00516.43
7.2.290.0140.00816.44
7.2.280.0150.00816.51
7.2.270.0190.00516.32
7.2.260.0150.00716.46
7.2.250.0190.00316.46
7.2.240.0170.00616.48
7.2.230.0120.01016.40
7.2.220.0130.00816.43
7.2.210.0100.01216.54
7.2.200.0120.01116.45
7.2.190.0120.00916.51
7.2.180.0140.00816.08
7.2.170.0120.00816.12
7.2.160.0130.00516.07
7.2.150.0160.00817.05
7.2.140.0150.00817.00
7.2.130.0130.00816.94
7.2.120.0110.00916.99
7.2.110.0110.00816.95
7.2.100.0090.00816.99
7.2.90.0110.00816.92
7.2.80.0130.00516.92
7.2.70.0090.00917.00
7.2.60.0080.01116.89
7.2.50.0110.00716.93
7.2.40.0100.00916.97
7.2.30.0100.00816.96
7.2.20.0110.00916.98
7.2.10.0090.01117.06
7.2.00.0100.00916.91
7.1.330.0150.00616.70
7.1.320.0170.00516.71
7.1.310.0130.00816.60
7.1.300.0130.00916.68
7.1.290.0200.00316.67
7.1.280.0120.00915.93
7.1.270.0120.01116.04
7.1.260.0140.00716.01
7.1.250.0110.00715.90
7.1.240.0160.00916.00
7.1.230.0180.00815.97
7.1.220.0130.01015.98
7.1.210.0220.00616.04
7.1.200.0150.00615.89
7.1.190.0170.00915.96
7.1.180.0190.00615.95
7.1.170.0310.00816.01
7.1.160.0190.00615.96
7.1.150.0160.00915.99
7.1.140.0150.01315.96
7.1.130.0230.00816.00
7.1.120.0190.00915.84
7.1.110.0190.00715.96
7.1.100.0170.00915.90
7.1.90.0160.00815.98
7.1.80.0150.01015.99
7.1.70.0160.00616.18
7.1.60.0130.00916.71
7.1.50.0220.00816.22
7.1.40.0170.01015.95
7.1.30.0200.00816.04
7.1.20.0170.01016.00
7.1.10.0160.00815.97
7.1.00.0750.01917.26
7.0.330.0130.01115.58
7.0.320.0130.01015.64
7.0.310.0160.00815.63
7.0.300.0140.01015.73
7.0.290.0170.00615.66
7.0.280.0200.00515.50
7.0.270.0210.00715.67
7.0.260.0160.01015.67
7.0.250.0200.00615.63
7.0.240.0170.00915.73
7.0.230.0170.00615.72
7.0.220.0180.00715.75
7.0.210.0170.00815.73
7.0.200.0310.00615.93
7.0.190.0180.00915.72
7.0.180.0190.00615.66
7.0.170.0180.00615.74
7.0.160.0170.00815.75
7.0.150.0200.00815.73
7.0.140.0190.00515.68
7.0.130.0180.00915.60
7.0.120.0180.00715.66
7.0.110.0160.00815.67
7.0.100.0180.00515.57
7.0.90.0190.00615.57
7.0.80.0170.01916.41
7.0.70.0130.01816.46
7.0.60.0140.01716.43
7.0.50.0140.02416.62
7.0.40.0200.01616.60
7.0.30.0160.02116.62
7.0.20.0170.01816.47
7.0.10.0160.02116.57
7.0.00.0140.01816.52
5.6.400.0140.00615.42
5.6.390.0140.01015.57
5.6.380.0110.01515.57
5.6.370.0150.01115.64
5.6.360.0150.01215.61
5.6.350.0140.01015.64
5.6.340.0150.01015.58
5.6.330.0140.01015.58
5.6.320.0190.00815.58
5.6.310.0180.00915.64
5.6.300.0220.00515.57
5.6.290.0170.00815.47
5.6.280.0150.02116.84
5.6.270.0160.00915.54
5.6.260.0170.00915.76
5.6.250.0130.01015.64
5.6.240.0180.00715.59
5.6.230.0170.01816.63
5.6.220.0130.01916.61
5.6.210.0190.01516.52
5.6.200.0130.02516.71
5.6.190.0120.02716.71
5.6.180.0190.01716.64
5.6.170.0160.02216.74
5.6.160.0110.02116.73
5.6.150.0180.02116.66
5.6.140.0160.02316.73
5.6.130.0160.02116.68
5.6.120.0140.02216.66
5.6.110.0160.01316.61
5.6.100.0150.02416.61
5.6.90.0090.02916.78
5.6.80.0120.02316.49
5.6.70.0140.02116.50
5.6.60.0140.01716.63
5.6.50.0140.02316.52
5.6.40.0160.02116.47
5.6.30.0100.02516.51
5.6.20.0120.02216.57
5.6.10.0130.01816.58
5.6.00.0140.02316.57
5.5.380.0160.01015.56
5.5.370.0120.01816.56
5.5.360.0140.01616.52
5.5.350.0130.01716.49
5.5.340.0160.02116.53
5.5.330.0170.02016.60
5.5.320.0150.02616.59
5.5.310.0140.02316.56
5.5.300.0140.02516.62
5.5.290.0120.02116.70
5.5.280.0150.02916.54
5.5.270.0160.01716.57
5.5.260.0150.02416.57
5.5.250.0120.02216.55
5.5.240.0130.01416.40
5.5.230.0130.02316.42
5.5.220.0130.01616.45
5.5.210.0130.01516.44
5.5.200.0130.02316.41
5.5.190.0140.01916.39
5.5.180.0130.01616.34
5.5.170.0130.01115.50
5.5.160.0150.01616.37
5.5.150.0150.02016.54
5.5.140.0140.01516.47
5.5.130.0130.01516.40
5.5.120.0130.02416.45
5.5.110.0140.02016.40
5.5.100.0110.02516.49
5.5.90.0180.02016.46
5.5.80.0120.02216.43
5.5.70.0130.01616.46
5.5.60.0130.01616.37
5.5.50.0120.01516.46
5.5.40.0110.01616.45
5.5.30.0130.01916.46
5.5.20.0130.01916.34
5.5.10.0160.01416.38
5.5.00.0090.01816.48
5.4.450.0110.01514.49
5.4.440.0120.01714.40
5.4.430.0100.01314.46
5.4.420.0100.01814.42
5.4.410.0100.02014.45
5.4.400.0130.01814.30
5.4.390.0100.01614.44
5.4.380.0070.02314.36
5.4.370.0110.01914.34
5.4.360.0100.01414.40
5.4.350.0100.02314.33
5.4.340.0090.02414.33
5.4.330.0110.00713.19
5.4.320.0110.02114.30
5.4.310.0100.02314.36
5.4.300.0130.02114.31
5.4.290.0100.01714.39
5.4.280.0100.01614.35
5.4.270.0100.02314.33
5.4.260.0090.02114.34
5.4.250.0120.01314.36
5.4.240.0120.02014.27
5.4.230.0100.02114.32
5.4.220.0090.02014.43
5.4.210.0110.01614.36
5.4.200.0100.01514.30
5.4.190.0130.01714.40
5.4.180.0080.01914.29
5.4.170.0120.01114.37
5.4.160.0110.01814.34
5.4.150.0130.01514.28
5.4.140.0100.02113.82
5.4.130.0090.02213.85
5.4.120.0140.01913.84
5.4.110.0070.01613.83
5.4.100.0140.01913.87
5.4.90.0110.01913.92
5.4.80.0120.02013.85
5.4.70.0130.01713.85
5.4.60.0090.01413.85
5.4.50.0110.01913.86
5.4.40.0110.01713.85
5.4.30.0120.01513.84
5.4.20.0110.01813.83
5.4.10.0090.01413.85
5.4.00.0080.01913.68

preferences:
29.81 ms | 403 KiB | 5 Q