3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait EndpointInjector { public function before($str) { echo $str; } } class Endpoint { use EndpointInjector; public function test($boringObj) { return $boringObj->withBody('#'); } } class BoringObj { public function withBody($str) { return $str; } } $ep = new Endpoint(); $ep->before(); $ep->test(new BoringObj());

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.0080.00616.63
8.3.50.0070.00716.63
8.3.40.0120.00318.79
8.3.30.0110.00318.86
8.3.20.0050.00320.04
8.3.10.0040.00423.54
8.3.00.0040.00423.61
8.2.180.0040.01116.75
8.2.170.0030.01722.96
8.2.160.0150.00020.43
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00019.64
8.2.120.0030.00526.35
8.2.110.0050.00522.11
8.2.100.0080.00417.72
8.2.90.0040.00417.63
8.2.80.0030.00518.77
8.2.70.0000.00917.93
8.2.60.0040.00418.16
8.2.50.0060.00318.10
8.2.40.0030.00521.06
8.2.30.0040.00419.12
8.2.20.0000.00717.61
8.2.10.0060.00318.07
8.2.00.0040.00417.97
8.1.280.0110.00425.92
8.1.270.0030.00622.11
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0090.00022.01
8.1.230.0040.00717.70
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0070.00317.36
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00618.54
8.1.160.0000.00718.89
8.1.150.0040.00418.89
8.1.140.0040.00819.62
8.1.130.0070.00219.14
8.1.120.0070.00017.51
8.1.110.0050.00217.49
8.1.100.0050.00217.52
8.1.90.0000.00717.32
8.1.80.0080.00017.34
8.1.70.0030.00317.50
8.1.60.0000.00817.58
8.1.50.0080.00017.45
8.1.40.0060.00317.39
8.1.30.0080.00017.68
8.1.20.0000.00817.67
8.1.10.0030.00517.50
8.1.00.0040.00417.49
8.0.300.0070.00018.77
8.0.290.0050.00316.88
8.0.280.0030.00318.39
8.0.270.0030.00317.30
8.0.260.0000.00616.88
8.0.250.0030.00316.84
8.0.240.0040.00417.08
8.0.230.0030.00317.05
8.0.220.0030.00317.01
8.0.210.0050.00216.88
8.0.200.0030.00316.90
8.0.190.0070.00317.05
8.0.180.0000.00816.99
8.0.170.0030.00516.96
8.0.160.0040.00417.03
8.0.150.0050.00216.77
8.0.140.0040.00416.79
8.0.130.0000.00513.42
8.0.120.0000.00816.76
8.0.110.0040.00416.93
8.0.100.0040.00416.98
8.0.90.0030.00516.85
8.0.80.0030.01216.97
8.0.70.0000.00816.84
8.0.60.0080.00016.98
8.0.50.0040.00417.00
8.0.30.0140.00316.91
8.0.20.0080.01217.40
8.0.10.0000.00817.05
8.0.00.0100.00916.85
7.4.330.0060.00016.79
7.4.320.0060.00016.61
7.4.300.0030.00316.60
7.4.290.0070.00016.48
7.4.280.0040.00416.43
7.4.270.0050.00216.48
7.4.260.0040.00416.38
7.4.250.0000.00816.41
7.4.240.0030.00316.52
7.4.230.0030.00316.45
7.4.220.0170.01016.52
7.4.210.0090.00616.54
7.4.200.0000.00716.43
7.4.160.0030.01216.60
7.4.150.0090.00917.40
7.4.140.0140.00617.86
7.4.130.0120.00616.69
7.4.120.0100.01016.46
7.4.110.0050.01216.55
7.4.100.0080.00816.43
7.4.90.0140.00416.55
7.4.80.0130.00319.39
7.4.70.0030.01316.58
7.4.60.0060.00916.42
7.4.50.0060.01016.20
7.4.40.0040.01216.39
7.4.30.0170.00016.53
7.4.00.0040.01214.90
7.3.330.0020.00313.45
7.3.320.0030.00313.34
7.3.310.0070.00016.43
7.3.300.0070.00016.32
7.3.290.0030.00316.18
7.3.280.0090.00516.34
7.3.270.0130.00317.40
7.3.260.0120.01116.51
7.3.240.0070.01116.42
7.3.230.0090.00916.43
7.3.210.0040.01416.42
7.3.200.0090.00919.39
7.3.190.0030.01616.46
7.3.180.0140.00016.45
7.3.170.0100.00716.67
7.3.160.0100.00916.46
7.2.330.0150.00316.64
7.2.320.0100.00716.66
7.2.310.0100.00816.55
7.2.300.0100.00616.78
7.2.290.0090.00916.50
7.2.60.0070.00716.73
7.2.00.0090.00619.51
7.1.200.0000.01415.71
7.1.100.0110.00018.08
7.1.70.0040.00716.90
7.1.60.0130.01019.27
7.1.50.0100.01316.89
7.1.00.0070.07322.36
7.0.200.0000.01016.71
7.0.60.0070.06721.77
7.0.50.0070.03717.86
7.0.40.0070.05720.16
7.0.30.0330.06720.26
7.0.20.0370.07320.34
7.0.10.0070.07320.23
7.0.00.0030.08720.19
5.6.280.0030.04321.14
5.6.210.0130.06020.55
5.6.200.0070.07318.16
5.6.190.0100.03720.67
5.6.180.0500.04320.39
5.6.170.0300.07720.54
5.6.160.0030.08720.43
5.6.150.0000.04718.12
5.6.140.0070.08318.24
5.6.130.0070.08018.28
5.6.120.0070.06321.15
5.6.110.0070.07721.02
5.6.100.0130.08021.17
5.6.90.0100.08320.97
5.6.80.0200.07020.34
5.5.350.0030.04720.43
5.5.340.0000.04317.99
5.5.330.0030.06020.29
5.5.320.0230.04320.27
5.5.310.0270.04320.37
5.5.300.0070.08318.03
5.5.290.0130.07318.07
5.5.280.0100.08320.89
5.5.270.0030.04720.80
5.5.260.0130.07720.80
5.5.250.0000.09320.70
5.5.240.0200.06720.34

preferences:
35.81 ms | 401 KiB | 5 Q