3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class SomeImmutableObject { private $someString; public function __construct(string $value) { $this->someString = $value; } public function getValue(): string { return 'the value is:' . $this->someString . ' - '; } } $one = new SomeImmutableObject('Foo'); echo $one->getValue(); //Foo $one->__construct('Bar'); echo $one->getValue(); //Bar

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.0110.00416.75
8.3.50.0130.00916.47
8.3.40.0040.01118.72
8.3.30.0040.01118.84
8.3.20.0020.00524.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0080.00825.92
8.2.170.0120.00319.09
8.2.160.0070.01022.96
8.2.150.0000.00825.66
8.2.140.0020.00524.66
8.2.130.0000.00826.16
8.2.120.0050.00321.05
8.2.110.0060.00320.38
8.2.100.0070.00417.59
8.2.90.0040.00417.63
8.2.80.0050.00318.97
8.2.70.0000.00817.68
8.2.60.0030.00517.94
8.2.50.0070.00019.43
8.2.40.0060.00321.02
8.2.30.0050.00319.19
8.2.20.0030.00518.09
8.2.10.0000.00719.32
8.2.00.0050.00219.12
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.91
8.1.230.0080.00317.76
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.36
8.1.190.0000.00817.23
8.1.180.0000.00818.99
8.1.170.0000.00918.65
8.1.160.0000.00719.13
8.1.150.0030.00618.88
8.1.140.0040.00418.80
8.1.130.0030.00317.49
8.1.120.0060.00317.50
8.1.110.0060.00317.33
8.1.100.0050.00317.46
8.1.90.0040.00417.35
8.1.80.0080.00317.39
8.1.70.0040.00417.46
8.1.60.0030.00617.54
8.1.50.0040.00417.50
8.1.40.0050.00217.46
8.1.30.0060.00317.66
8.1.20.0040.00417.65
8.1.10.0060.00317.56
8.1.00.0030.00617.50
8.0.300.0070.00018.77
8.0.290.0030.00516.58
8.0.280.0030.00318.43
8.0.270.0060.00316.82
8.0.260.0070.00016.75
8.0.250.0000.00716.95
8.0.240.0000.00616.82
8.0.230.0030.00316.84
8.0.220.0000.00716.89
8.0.210.0040.00416.75
8.0.200.0030.00316.83
8.0.190.0000.00716.84
8.0.180.0040.00416.84
8.0.170.0040.00416.91
8.0.160.0040.00416.82
8.0.150.0030.00416.90
8.0.140.0040.00416.71
8.0.130.0030.00313.27
8.0.120.0000.00816.87
8.0.110.0050.00216.94
8.0.100.0040.00416.84
8.0.90.0050.00216.84
8.0.80.0040.01216.89
8.0.70.0050.00316.77
8.0.60.0040.00416.86
8.0.50.0040.00416.70
8.0.30.0070.01016.73
8.0.20.0120.00616.80
8.0.10.0120.00916.92
8.0.00.0170.00516.86
7.4.330.0000.00515.55
7.4.320.0000.00616.36
7.4.300.0060.00016.58
7.4.290.0040.00416.63
7.4.280.0030.00516.58
7.4.270.0060.00016.60
7.4.260.0000.00513.31
7.4.250.0070.00016.59
7.4.240.0000.00716.53
7.4.230.0050.00316.57
7.4.220.0050.00116.66
7.4.210.0080.00816.60
7.4.200.0070.00016.34
7.4.160.0080.00816.49
7.4.150.0140.00816.58
7.4.140.0120.00816.46
7.4.130.0160.00816.53
7.4.120.0110.00816.41
7.4.110.0070.01116.35
7.4.100.0050.01316.45
7.4.90.0100.00616.40
7.4.80.0150.00417.90
7.4.70.0060.01118.01
7.4.60.0090.01017.89
7.4.50.0100.00817.83
7.4.40.0120.01017.94
7.4.30.0060.01017.97
7.4.20.0050.01417.94
7.4.10.0120.00717.96
7.4.00.0110.00817.96
7.3.330.0070.00016.33
7.3.320.0000.00613.23
7.3.310.0070.00016.09
7.3.300.0060.00016.28
7.3.290.0040.00416.32
7.3.280.0120.00316.32
7.3.270.0150.00616.27
7.3.260.0120.00916.30
7.3.250.0310.00316.34
7.3.240.0060.01516.26
7.3.230.0120.00816.29
7.3.220.0080.00816.15
7.3.210.0100.00716.43
7.3.200.0090.00917.83
7.3.190.0070.00917.77
7.3.180.0070.01317.79
7.3.170.0080.01017.82
7.3.160.0090.00917.76
7.3.150.0050.01317.82
7.3.140.0110.00817.82
7.3.130.0120.00917.82
7.3.120.0090.01117.80
7.3.110.0080.01117.77
7.3.100.0110.00817.75
7.3.90.0120.00717.97
7.3.80.0110.00817.79
7.3.70.0060.01017.85
7.3.60.0110.01117.86
7.3.50.0130.01017.90
7.3.40.0050.01417.90
7.3.30.0100.01017.93
7.3.20.0160.00717.84
7.3.10.0140.01217.85
7.3.00.0150.01017.87
7.2.340.0280.00416.36
7.2.330.0150.00716.58
7.2.320.0130.01117.87
7.2.310.0160.00817.83
7.2.300.0130.01317.86
7.2.290.0160.01117.86
7.2.280.0170.01017.87
7.2.270.0140.01117.86
7.2.260.0170.00817.85
7.2.250.0180.01117.86
7.2.240.0150.01217.89
7.2.230.0130.01217.86
7.2.220.0170.01417.89
7.2.210.0190.00917.88
7.2.200.0190.01217.99
7.2.190.0180.01017.91
7.2.180.0180.00917.92
7.2.170.0180.00717.98
7.2.160.0130.01017.95
7.2.150.0220.01118.01
7.2.140.0140.01117.98
7.2.130.0170.01018.06
7.2.120.0150.01518.01
7.2.110.0300.00618.05
7.2.100.0110.01318.03
7.2.90.0220.01317.94
7.2.80.0200.00917.96
7.2.70.0150.01118.01
7.2.60.0190.00917.99
7.2.50.0240.00718.01
7.2.40.0160.01118.02
7.2.30.0200.01018.01
7.2.20.0150.01518.01
7.2.10.0250.00917.98
7.2.00.0190.01118.01

preferences:
49.78 ms | 401 KiB | 5 Q