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 /'; $this->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.0130.00616.50
8.3.50.0110.00721.99
8.3.40.0160.00018.84
8.3.30.0080.00818.59
8.3.20.0080.00020.39
8.3.10.0070.00023.57
8.3.00.0040.00417.63
8.2.180.0170.00318.07
8.2.170.0100.00722.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0050.00226.16
8.2.120.0060.00317.46
8.2.110.0040.00822.29
8.2.100.0080.00417.93
8.2.90.0000.00819.27
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0050.00317.92
8.2.50.0030.00518.07
8.2.40.0000.00819.41
8.2.30.0020.00520.58
8.2.20.0040.00417.62
8.2.10.0040.00418.02
8.2.00.0040.00418.09
8.1.280.0120.00925.92
8.1.270.0060.00323.91
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00420.70
8.1.230.0060.00617.66
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0050.00317.25
8.1.180.0000.00718.10
8.1.170.0090.00018.89
8.1.160.0000.00721.93
8.1.150.0040.00418.81
8.1.140.0000.00819.56
8.1.130.0070.00017.74
8.1.120.0040.00417.40
8.1.110.0040.00417.36
8.1.100.0040.00317.46
8.1.90.0000.00717.48
8.1.80.0040.00417.53
8.1.70.0030.00317.31
8.1.60.0030.00517.46
8.1.50.0000.00917.51
8.1.40.0040.00417.55
8.1.30.0040.00817.59
8.1.20.0050.00217.55
8.1.10.0070.00017.47
8.1.00.0050.00217.45
8.0.300.0040.00418.77
8.0.290.0070.00016.61
8.0.280.0030.00318.36
8.0.270.0030.00317.22
8.0.260.0040.00417.17
8.0.250.0000.00816.87
8.0.240.0040.00416.98
8.0.230.0030.00316.95
8.0.220.0040.00416.90
8.0.210.0030.00316.78
8.0.200.0000.00616.84
8.0.190.0090.00316.85
8.0.180.0050.00216.81
8.0.170.0000.00716.88
8.0.160.0030.00716.90
8.0.150.0000.00716.94
8.0.140.0000.00716.73
8.0.130.0030.00313.29
8.0.120.0080.00016.84
8.0.110.0000.00716.93
8.0.100.0030.00616.92
8.0.90.0040.00416.93
8.0.80.0030.01316.86
8.0.70.0040.00416.74
8.0.60.0000.00816.78
8.0.50.0000.00716.93
8.0.30.0050.01117.24
8.0.20.0110.00717.40
8.0.10.0090.00016.89
8.0.00.0080.00916.83
7.4.330.0050.00015.14
7.4.320.0060.00316.45
7.4.300.0030.00316.61
7.4.290.0080.00016.60
7.4.280.0080.00016.54
7.4.270.0000.00716.42
7.4.260.0030.00316.48
7.4.250.0060.00316.55
7.4.240.0020.00516.55
7.4.230.0030.00316.70
7.4.220.0030.01416.52
7.4.210.0090.00616.56
7.4.200.0000.00716.48
7.4.160.0110.00416.55
7.4.150.0120.00617.40
7.4.140.0030.01517.86
7.4.130.0090.00916.59
7.4.120.0130.00716.51
7.4.110.0030.01516.41
7.4.100.0120.00916.51
7.4.90.0060.01016.59
7.4.80.0060.01519.39
7.4.70.0180.00316.43
7.4.60.0110.00616.54
7.4.50.0050.00316.36
7.4.40.0100.00916.38
7.4.30.0150.00316.56
7.4.00.0090.00914.84
7.3.330.0000.00613.13
7.3.320.0040.00413.29
7.3.310.0030.00616.35
7.3.300.0030.00616.30
7.3.290.0000.00716.22
7.3.280.0070.00916.26
7.3.270.0030.01517.40
7.3.260.0150.00716.43
7.3.250.0120.00516.45
7.3.240.0140.00516.29
7.3.230.0090.00916.45
7.3.210.0080.01416.36
7.3.200.0100.00716.60
7.3.190.0170.00316.45
7.3.180.0070.01116.57
7.3.170.0120.00416.27
7.3.160.0130.00316.26
7.3.10.0040.01116.57
7.3.00.0030.01316.69
7.2.330.0140.00316.77
7.2.320.0080.00916.75
7.2.310.0140.01216.73
7.2.300.0100.00716.80
7.2.290.0110.00716.73
7.2.130.0100.00317.06
7.2.120.0090.00616.69
7.2.110.0030.01316.99
7.2.100.0030.00617.14
7.2.90.0070.00716.85
7.2.80.0000.01516.96
7.2.70.0000.01816.88
7.2.60.0060.00316.97
7.2.50.0060.00916.85
7.2.40.0110.00017.08
7.2.30.0060.01017.01
7.2.20.0060.00917.05
7.2.10.0090.00616.96
7.2.00.0150.01018.11
7.1.250.0070.00715.63
7.1.100.0060.00318.27
7.1.70.0030.00717.14
7.1.60.0000.01819.43
7.1.50.0060.01616.96
7.1.00.0030.07322.41
7.0.200.3740.00314.63
7.0.60.0030.08719.97
7.0.50.0030.08717.88
7.0.40.0000.05020.02
7.0.30.0100.05020.12
7.0.20.0270.05320.22
7.0.10.0130.07720.14
7.0.00.0030.04320.07
5.6.280.0030.03321.13
5.6.210.0000.08320.55
5.6.200.0200.07018.16
5.6.190.0100.05320.50
5.6.180.3530.04020.61
5.6.170.0270.04020.54
5.6.160.0070.09020.39
5.6.150.0070.08318.17
5.6.140.0070.05718.20
5.6.130.0130.04718.21
5.6.120.0170.07321.15
5.6.110.0070.08021.01
5.6.100.0000.04321.08
5.6.90.0100.07021.01
5.6.80.0100.03720.41
5.5.350.4300.04320.50
5.5.340.0000.04318.07
5.5.330.0030.04320.31
5.5.320.0230.03320.42
5.5.310.0330.06720.34
5.5.300.0030.04017.93
5.5.290.0030.08018.04
5.5.280.0130.05020.97
5.5.270.0100.06020.89
5.5.260.0200.07020.75
5.5.250.0030.08320.58
5.5.240.0030.04720.19
5.4.450.0270.04319.42
5.4.440.0270.04719.34
5.4.430.0100.06319.45
5.4.420.0330.05019.46
5.4.410.0230.07019.42
5.4.400.0200.04719.03
5.4.390.0100.05719.13
5.4.380.0170.05019.22
5.4.370.0170.05019.13
5.4.360.0200.05019.13
5.4.350.0130.05319.13
5.4.340.0130.05719.02
5.4.320.0170.05319.19
5.4.310.0170.05019.23
5.4.300.0100.05719.28
5.4.290.0270.04019.35
5.4.280.0170.05019.22
5.4.270.0130.05019.07
5.4.260.0130.05018.96
5.4.250.0130.05319.12
5.4.240.0170.05018.78
5.4.230.0230.04318.96
5.4.220.0200.05018.96
5.4.210.0230.04319.21
5.4.200.0230.04718.78
5.4.190.0170.04719.34
5.4.180.0230.04319.34
5.4.170.0270.04019.09
5.4.160.0100.05319.24
5.4.150.0070.06319.26
5.4.140.0170.05016.44
5.4.130.0130.05016.50
5.4.120.0130.05016.72
5.4.110.0130.05016.43
5.4.100.0100.05716.69
5.4.90.0130.04716.46
5.4.80.0200.04016.66
5.4.70.0130.05016.63
5.4.60.0100.05316.62
5.4.50.0130.05016.22
5.4.40.0130.05016.39
5.4.30.0170.04716.54
5.4.20.0130.05016.25
5.4.10.0230.04316.16
5.4.00.0130.05015.85

preferences:
54.39 ms | 401 KiB | 5 Q