3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Doll { function __invoke(); } class LargeDoll implements Doll { private $inner; function __construct(Doll $inner) { $this->inner = $inner; } function __invoke() { return ($this->inner)() . ' world'; } } class SmallDoll implements Doll { function __invoke() { return 'hello'; } } $russian = new LargeDoll(new SmallDoll()); var_dump($russian());

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.10.0040.00417.72
8.3.140.0050.00316.67
8.3.130.0040.00418.36
8.3.120.0030.00619.16
8.3.110.0040.00420.94
8.3.100.0040.01224.06
8.3.90.0040.00426.77
8.3.80.0030.00618.31
8.3.70.0180.00018.02
8.3.60.0110.00418.43
8.3.50.0140.00721.14
8.3.40.0110.00418.63
8.3.30.0110.00418.57
8.3.20.0040.00420.35
8.3.10.0030.00521.80
8.3.00.0040.00422.45
8.2.260.0000.00816.92
8.2.250.0040.00418.47
8.2.240.0060.00317.32
8.2.230.0030.00622.58
8.2.220.0050.00537.54
8.2.210.0070.00026.77
8.2.200.0060.00318.88
8.2.190.0150.00016.58
8.2.180.0150.00418.16
8.2.170.0070.00718.79
8.2.160.0120.00322.96
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00020.57
8.2.120.0000.00726.35
8.2.110.0030.00622.25
8.2.100.0040.00817.87
8.2.90.0000.00817.75
8.2.80.0030.00518.55
8.2.70.0080.00017.38
8.2.60.0080.00017.50
8.2.50.0000.00817.63
8.2.40.0000.00817.62
8.2.30.0030.00519.30
8.2.20.0070.00018.00
8.2.10.0000.00718.11
8.2.00.0050.00218.16
8.1.310.0070.01018.52
8.1.300.0030.00618.32
8.1.290.0060.00330.84
8.1.280.0030.01025.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0020.00528.09
8.1.240.0070.00319.20
8.1.230.0080.00418.98
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0000.00817.47
8.1.190.0100.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00418.88
8.1.160.0070.00018.93
8.1.150.0000.00720.14
8.1.140.0000.00719.63
8.1.130.0000.00718.82
8.1.120.0040.00417.36
8.1.110.0070.00017.31
8.1.100.0090.00017.34
8.1.90.0000.00717.34
8.1.80.0070.00017.34
8.1.70.0000.00717.45
8.1.60.0000.00717.58
8.1.50.0040.00417.55
8.1.40.0040.00417.41
8.1.30.0000.00917.72
8.1.20.0000.00717.63
8.1.10.0000.00717.39
8.1.00.0000.00817.37
8.0.300.0030.00618.77
8.0.290.0080.00016.75
8.0.280.0080.00018.47
8.0.270.0040.00417.20
8.0.260.0030.00318.99
8.0.250.0080.00016.94
8.0.240.0030.00516.90
8.0.230.0070.00016.88
8.0.220.0070.00016.94
8.0.210.0030.00516.95
8.0.200.0000.00717.07
8.0.190.0000.00817.02
8.0.180.0000.00716.95
8.0.170.0000.00717.04
8.0.160.0070.00016.84
8.0.150.0040.00416.87
8.0.140.0070.00416.94
8.0.130.0030.00313.37
8.0.120.0000.00816.96
8.0.110.0030.00316.95
8.0.100.0000.00816.85
8.0.90.0040.00416.91
8.0.80.0040.01116.96
8.0.70.0040.00416.97
8.0.60.0040.00416.89
8.0.50.0050.00216.77
8.0.30.0090.00917.07
8.0.20.0120.00817.40
8.0.10.0030.00516.96
8.0.00.0060.01616.72
7.4.330.0000.00615.55
7.4.320.0000.00616.44
7.4.300.0030.00316.36
7.4.290.0040.00416.49
7.4.280.0030.00616.45
7.4.270.0030.00316.43
7.4.260.0060.00316.50
7.4.250.0040.00416.55
7.4.240.0000.00716.52
7.4.230.0030.00316.53
7.4.220.0150.01516.61
7.4.210.0080.00816.57
7.4.200.0050.00216.25
7.4.160.0130.00316.52
7.4.150.0090.01317.40
7.4.140.0110.01217.86
7.4.130.0070.01016.51
7.4.120.0070.01316.56
7.4.110.0140.00316.43
7.4.100.0100.00716.47
7.4.90.0120.00616.32
7.4.80.0090.00919.39
7.4.70.0140.00316.51
7.4.60.0100.01016.58
7.4.50.0040.01216.55
7.4.40.0070.01516.55
7.4.30.0080.00916.55
7.4.00.0040.01415.13
7.3.330.0050.00013.31
7.3.320.0050.00013.17
7.3.310.0040.00416.20
7.3.300.0000.00716.37
7.3.290.0100.01016.29
7.3.280.0120.00616.30
7.3.270.0030.02017.40
7.3.260.0140.00616.31
7.3.240.0050.01216.31
7.3.230.0110.00616.49
7.3.210.0150.00016.29
7.3.200.0100.01316.45
7.3.190.0140.00316.46
7.3.180.0100.01416.31
7.3.170.0110.00716.49
7.3.160.0170.00016.43
7.2.330.0150.00616.61
7.2.320.0080.00816.82
7.2.310.0080.00816.54
7.2.300.0130.00316.55
7.2.290.0080.00816.61
7.2.110.0230.00616.68
7.2.100.0120.00816.51
7.2.90.0090.01916.76
7.2.80.0110.01816.68
7.2.70.0130.01316.93
7.2.60.0130.00916.79
7.2.50.0430.00417.06
7.2.40.0180.00916.73
7.2.30.0350.01116.94
7.2.20.0300.01316.63
7.2.10.0240.01216.71
7.2.00.0210.00716.68
7.1.230.0440.01015.84
7.1.220.0230.01215.81
7.1.210.0160.01015.78
7.1.200.0130.00715.70
7.1.190.0230.00715.72
7.1.180.0340.00515.65
7.1.170.0160.00815.67
7.1.160.0190.00515.50
7.1.150.0190.00515.58
7.1.140.0150.00915.47
7.1.130.0110.01315.48
7.1.120.0300.00915.86
7.1.110.0330.00915.78
7.1.100.0360.00615.94
7.1.90.0320.00015.49
7.1.80.0290.00815.82
7.1.70.0340.00716.49
7.1.60.0290.00716.54
7.1.50.0130.00816.49
7.1.40.0140.01116.16
7.1.30.0140.00816.28
7.1.20.0160.00516.19
7.1.10.0140.00516.04
7.1.00.0140.01216.22
7.0.310.0400.00715.51
7.0.300.0150.01015.43
7.0.290.0380.00615.34
7.0.280.0070.01415.24
7.0.270.0300.00715.39
7.0.260.0080.01615.49
7.0.250.0100.01315.25
7.0.240.0130.00515.25
7.0.230.0130.00915.34
7.0.220.0170.00915.46
7.0.210.0180.00515.36
7.0.200.0060.01015.88
7.0.190.0060.01116.23
7.0.180.0070.00615.80
7.0.170.0240.00415.88
7.0.160.0190.00915.99
7.0.150.0140.00715.78
7.0.140.0120.00715.84
7.0.130.0080.00715.95
7.0.120.0090.00615.95
7.0.110.0230.00815.69
7.0.100.0080.00815.99
7.0.90.0240.00515.92
7.0.80.0120.00516.01
7.0.70.0160.00815.83
7.0.60.0100.00515.93
7.0.50.0160.00615.86
7.0.40.0080.00914.35
7.0.30.0110.00614.29
7.0.20.0050.01114.19
7.0.10.0130.00514.37
7.0.00.0080.00814.29
5.6.380.0160.00814.30

preferences:
27.25 ms | 403 KiB | 5 Q