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('Pippo'); echo $one->getValue(); //Pippo $one->__construct('Pluto'); echo $one->getValue(); //Pluto

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.0140.00318.56
8.3.50.0040.01516.77
8.3.40.0110.00620.63
8.3.30.0110.00718.83
8.3.20.0040.00420.95
8.3.10.0040.00420.16
8.3.00.0050.00320.70
8.2.180.0150.00616.75
8.2.170.0120.00322.96
8.2.160.0040.01121.14
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00926.16
8.2.110.0060.00319.20
8.2.100.0080.00417.78
8.2.90.0040.00417.75
8.2.80.0000.01018.79
8.2.70.0000.00817.75
8.2.60.0000.00817.63
8.2.50.0050.00317.63
8.2.40.0050.00319.21
8.2.30.0080.00019.24
8.2.20.0060.00318.08
8.2.10.0000.00719.30
8.2.00.0030.00319.23
8.1.280.0100.01025.92
8.1.270.0000.00722.18
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.98
8.1.230.0040.00818.95
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0060.00317.35
8.1.180.0050.00318.10
8.1.170.0000.00717.75
8.1.160.0050.00218.89
8.1.150.0000.00718.89
8.1.140.0000.00717.43
8.1.130.0000.00720.01
8.1.120.0000.00817.37
8.1.110.0000.01017.47
8.1.100.0040.00417.38
8.1.90.0060.00317.49
8.1.80.0040.00417.34
8.1.70.0000.00817.40
8.1.60.0040.00417.48
8.1.50.0080.00017.47
8.1.40.0040.00417.39
8.1.30.0050.00317.47
8.1.20.0000.00817.61
8.1.10.0000.00817.43
8.1.00.0040.00717.50
8.0.300.0030.00618.77
8.0.290.0020.00516.75
8.0.280.0000.00718.32
8.0.270.0000.00717.25
8.0.260.0000.00720.08
8.0.250.0030.00316.97
8.0.240.0000.00717.02
8.0.230.0000.00716.93
8.0.220.0000.00716.82
8.0.210.0030.00316.93
8.0.200.0040.00416.83
8.0.190.0070.00016.90
8.0.180.0040.00416.85
8.0.170.0060.00316.79
8.0.160.0000.00716.80
8.0.150.0000.00716.83
8.0.140.0040.00416.74
8.0.130.0030.00313.31
8.0.120.0000.00816.84
8.0.110.0050.00216.71
8.0.100.0040.00416.93
8.0.90.0030.00616.76
8.0.80.0040.01116.90
8.0.70.0070.00016.71
8.0.60.0050.00216.76
8.0.50.0040.00416.76
8.0.30.0100.00617.27
8.0.20.0070.01717.08
8.0.10.0050.00216.90
8.0.00.0030.01716.73
7.4.330.0000.00515.55
7.4.320.0000.00716.43
7.4.300.0070.00316.55
7.4.290.0040.00416.49
7.4.280.0050.00316.57
7.4.270.0000.00716.48
7.4.260.0050.00013.23
7.4.250.0040.00416.47
7.4.240.0000.00716.53
7.4.230.0000.00716.40
7.4.220.0040.00316.66
7.4.210.0060.01016.52
7.4.200.0030.00316.34
7.4.130.0120.00616.61
7.4.120.0030.01416.31
7.4.110.0140.00316.36
7.4.100.0090.01016.53
7.4.90.0120.00616.43
7.4.80.0140.00319.39
7.4.70.0030.01316.63
7.4.60.0090.00916.29
7.4.50.0050.00716.30
7.4.40.0130.00516.43
7.4.30.0130.00316.38
7.4.20.0080.00816.63
7.4.10.0130.01016.54
7.4.00.0130.01016.52
7.3.330.0030.00316.32
7.3.320.0050.00013.13
7.3.310.0000.00716.34
7.3.300.0030.00316.36
7.3.290.0090.00616.30
7.3.280.0040.01216.21
7.3.260.0100.00716.59
7.3.240.0070.01116.43
7.3.230.0170.01116.30
7.3.210.0100.00716.35
7.3.200.0130.00316.68
7.3.190.0170.00016.47
7.3.180.0060.01016.57
7.3.170.0060.01816.46
7.3.160.0110.00616.31
7.3.150.0100.00616.39
7.3.140.0000.01516.41
7.3.130.0070.01116.28
7.3.120.0130.00916.40
7.3.110.0000.01816.23
7.3.100.0120.00316.20
7.3.90.0120.00616.30
7.3.80.0130.00616.11
7.3.70.0060.01216.45
7.3.60.0030.01916.36
7.3.50.0110.00716.20
7.3.40.0040.01116.30
7.3.30.0060.01016.16
7.3.20.0060.00916.45
7.3.10.0090.00916.17
7.3.00.0090.00716.26
7.2.330.0180.00016.34
7.2.320.0060.01016.78
7.2.310.0030.01416.42
7.2.300.0070.01316.83
7.2.290.0040.01116.81
7.2.280.0110.00816.76
7.2.270.0070.01016.49
7.2.260.0090.00916.30
7.2.250.0070.01516.63
7.2.240.0130.00516.30
7.2.230.0040.01216.59
7.2.220.0070.01016.57
7.2.210.0110.01316.65
7.2.200.0090.00916.55
7.2.190.0100.01316.43
7.2.180.0060.01216.49
7.2.170.0070.01016.36
7.2.160.0110.00916.42
7.2.150.0360.00916.61
7.2.140.0070.01016.64
7.2.130.0080.00816.62
7.2.120.0150.00416.60
7.2.110.0110.00516.54
7.2.100.0130.00716.69
7.2.90.0030.01316.64
7.2.80.0090.00916.89
7.2.70.0130.00316.59
7.2.60.0070.01016.59
7.2.50.0050.01516.46
7.2.40.0100.01416.55
7.2.30.0070.01316.78
7.2.20.0160.00916.53
7.2.10.0060.01816.62
7.2.00.0170.00716.51

preferences:
62.93 ms | 400 KiB | 5 Q