3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { function calc1($v) { echo '/ calc1 trait /'.$this->x; } function calc($v) { echo '/ calc trait /'.$this->x; } } class MyClass { use A; public $x; function calc($v) { echo '/ calc class /'; A::calc1(5); //parent::calc($v); } } $x=new MyClass(); $x->x = 5; $x->calc(123);

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.0070.00716.63
8.3.50.0110.01022.05
8.3.40.0070.00718.60
8.3.30.0150.00018.77
8.3.20.0080.00020.32
8.3.10.0000.00823.70
8.3.00.0000.00817.63
8.2.180.0140.00718.17
8.2.170.0030.01322.96
8.2.160.0070.00720.39
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0020.00526.16
8.2.120.0040.00417.50
8.2.110.0040.00722.27
8.2.100.0030.00918.05
8.2.90.0060.00319.09
8.2.80.0050.00317.97
8.2.70.0080.00017.75
8.2.60.0030.00617.90
8.2.50.0030.00618.07
8.2.40.0000.00719.34
8.2.30.0070.00020.66
8.2.20.0040.00417.75
8.2.10.0000.00718.02
8.2.00.0040.00418.12
8.1.280.0130.00325.92
8.1.270.0040.00423.84
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00322.61
8.1.230.0040.00717.54
8.1.220.0000.00717.79
8.1.210.0050.00318.77
8.1.200.0070.00317.48
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0000.00819.02
8.1.160.0070.00021.89
8.1.150.0050.00318.88
8.1.140.0000.00819.50
8.1.130.0070.00017.75
8.1.120.0040.00417.49
8.1.110.0040.00417.46
8.1.100.0000.00717.31
8.1.90.0000.00717.52
8.1.80.0030.00517.45
8.1.70.0000.00717.39
8.1.60.0000.00817.59
8.1.50.0000.00817.50
8.1.40.0000.00817.42
8.1.30.0000.01117.68
8.1.20.0040.00417.54
8.1.10.0050.00217.46
8.1.00.0080.00017.53
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.35
8.0.270.0020.00517.31
8.0.260.0030.00317.18
8.0.250.0040.00416.99
8.0.240.0030.00316.91
8.0.230.0000.00716.86
8.0.220.0000.00716.85
8.0.210.0050.00216.83
8.0.200.0030.00317.05
8.0.190.0060.00317.06
8.0.180.0050.00216.94
8.0.170.0040.00416.98
8.0.160.0040.00716.99
8.0.150.0040.00416.88
8.0.140.0070.00016.88
8.0.130.0000.00613.32
8.0.120.0050.00316.93
8.0.110.0070.00016.91
8.0.100.0000.00717.00
8.0.90.0040.00416.91
8.0.80.0060.00916.95
8.0.70.0020.00516.76
8.0.60.0040.00416.84
8.0.50.0040.00417.02
8.0.30.0120.00917.03
8.0.20.0100.00817.40
8.0.10.0040.00416.98
8.0.00.0060.01416.79
7.4.330.0000.00515.22
7.4.320.0070.00016.44
7.4.300.0030.00316.52
7.4.290.0040.00416.53
7.4.280.0070.00016.55
7.4.270.0030.00616.40
7.4.260.0000.00716.59
7.4.250.0080.00016.58
7.4.240.0030.00416.63
7.4.230.0030.00316.58
7.4.220.0110.00616.58
7.4.210.0060.00816.53
7.4.200.0070.00016.67
7.4.160.0000.01516.59
7.4.150.0090.00917.40
7.4.140.0080.01417.86
7.4.130.0110.00716.64
7.4.120.0100.00816.40
7.4.110.0110.01116.54
7.4.100.0170.00716.64
7.4.90.0120.00916.67
7.4.80.0090.01319.39
7.4.70.0060.01016.60
7.4.60.0170.00316.43
7.4.50.0040.00416.49
7.4.40.0100.00716.45
7.4.30.0130.00316.43
7.4.00.0060.00915.06
7.3.330.0050.00013.17
7.3.320.0050.00213.36
7.3.310.0040.00416.36
7.3.300.0080.00016.23
7.3.290.0040.00416.28
7.3.280.0080.00916.35
7.3.270.0100.00717.40
7.3.260.0080.00816.38
7.3.240.0140.00816.45
7.3.230.0060.01016.44
7.3.210.0090.00916.49
7.3.200.0090.00616.27
7.3.190.0110.00516.57
7.3.180.0110.00716.39
7.3.170.0110.00516.44
7.3.160.0110.00616.52
7.2.330.0150.00616.78
7.2.320.0030.01316.73
7.2.310.0070.01916.84
7.2.300.0080.00816.68
7.2.290.0070.01016.86
7.2.60.0080.00816.75
7.2.00.0060.00619.32
7.1.200.0060.00615.59
7.1.100.0000.01418.13
7.1.70.0030.00616.80
7.1.60.0140.00719.43
7.1.50.0060.01316.72
7.1.00.0030.07722.45
7.0.200.0690.00314.75
7.0.60.0070.07719.79
7.0.50.0130.06717.86
7.0.40.0070.08320.27
7.0.30.0200.03720.27
7.0.20.0230.07720.09
7.0.10.0130.08020.09
7.0.00.0070.04320.09
5.6.280.0000.03321.10
5.6.210.0070.05320.60
5.6.200.0130.06718.21
5.6.190.0000.09020.43
5.6.180.3600.04320.77
5.6.170.0300.06720.39
5.6.160.0130.07320.55
5.6.150.0130.07718.15
5.6.140.0100.08318.15
5.6.130.0070.05718.24
5.6.120.0100.07720.98
5.6.110.0100.07721.03
5.6.100.0030.05020.96
5.6.90.0070.08021.10
5.6.80.0100.04020.38
5.5.350.3470.04320.45
5.5.340.0000.04718.04
5.5.330.0000.04720.21
5.5.320.0400.03020.24
5.5.310.0270.07320.25
5.5.300.0030.04717.96
5.5.290.0070.04017.95
5.5.280.0030.05320.97
5.5.270.0100.04320.73
5.5.260.0030.08720.88
5.5.250.0070.08020.70
5.5.240.0030.07720.20
5.4.450.0570.05719.11
5.4.440.0570.05719.51
5.4.430.0770.06319.45
5.4.420.0630.05319.28
5.4.410.0730.05319.32
5.4.400.0500.05019.03
5.4.390.0630.05019.26
5.4.380.0570.04719.06
5.4.370.0500.05019.02
5.4.360.0400.06019.24
5.4.350.0670.04319.29
5.4.340.0600.06018.75
5.4.320.0730.04319.26
5.4.310.0530.06019.24
5.4.300.0630.05319.23
5.4.290.0630.05019.02
5.4.280.0630.05319.21
5.4.270.0600.05018.96
5.4.260.0530.06018.96
5.4.250.0600.05319.12
5.4.240.0570.05019.09
5.4.230.0470.08019.25
5.4.220.0630.05718.80
5.4.210.0530.05019.09
5.4.200.0470.05319.12
5.4.190.0400.06018.96
5.4.180.0730.04319.34
5.4.170.0530.05018.95
5.4.160.0470.05319.11
5.4.150.0500.05319.23
5.4.140.0670.05716.34
5.4.130.0470.05016.57
5.4.120.0470.05016.40
5.4.110.0530.05016.64
5.4.100.0430.05316.57
5.4.90.0530.04316.46
5.4.80.0500.04316.55
5.4.70.0500.05016.45
5.4.60.0470.05016.65
5.4.50.0500.04716.23
5.4.40.0570.04316.40
5.4.30.0530.04716.59
5.4.20.0470.06716.59
5.4.10.0430.05716.48
5.4.00.0630.05316.00

preferences:
58.1 ms | 401 KiB | 5 Q