3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IAmImmutable { private $name; public static function createFromName($name) { return new self($name); } private function __construct($name) { $this->name = $name; } public function getName() { return $this->name; } } $object = IAmImmutable::createFromName('Peter'); var_dump($object->getName()); $object->__construct('Bob'); var_dump($object->getName());

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.0150.00316.63
8.3.50.0100.01222.11
8.3.40.0090.00918.90
8.3.30.0110.00718.79
8.3.20.0080.00020.21
8.3.10.0000.00723.64
8.3.00.0030.00619.50
8.2.180.0120.00618.13
8.2.170.0070.00722.96
8.2.160.0040.01120.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0110.00420.96
8.2.110.0030.00619.22
8.2.100.0030.00717.78
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0080.00017.92
8.2.50.0080.00018.07
8.2.40.0000.00819.38
8.2.30.0000.00720.61
8.2.20.0090.00017.67
8.2.10.0000.00717.98
8.2.00.0020.00518.00
8.1.280.0040.01125.92
8.1.270.0110.00424.02
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00621.18
8.1.230.0040.00717.42
8.1.220.0050.00217.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0030.00617.22
8.1.180.0050.00318.10
8.1.170.0060.00318.53
8.1.160.0000.00721.96
8.1.150.0080.00018.87
8.1.140.0030.00719.55
8.1.130.0040.00417.71
8.1.120.0000.00717.47
8.1.110.0000.00817.46
8.1.100.0000.00817.38
8.1.90.0050.00217.46
8.1.80.0040.00417.30
8.1.70.0030.00317.29
8.1.60.0050.00317.57
8.1.50.0050.00317.40
8.1.40.0000.00917.57
8.1.30.0000.00917.60
8.1.20.0040.00417.66
8.1.10.0060.00317.47
8.1.00.0040.00417.57
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0030.00318.41
8.0.270.0000.00717.23
8.0.260.0030.00317.20
8.0.250.0000.00717.00
8.0.240.0030.00316.93
8.0.230.0000.00717.02
8.0.220.0040.00416.89
8.0.210.0000.00716.85
8.0.200.0050.00217.00
8.0.190.0000.00716.93
8.0.180.0040.00416.85
8.0.170.0060.00316.96
8.0.160.0040.00416.79
8.0.150.0070.00016.91
8.0.140.0080.00016.76
8.0.130.0030.00313.32
8.0.120.0000.00816.76
8.0.110.0040.00416.90
8.0.100.0040.00416.86
8.0.90.0020.00516.79
8.0.80.0110.01016.83
8.0.70.0000.00816.92
8.0.60.0040.00416.80
8.0.50.0050.00316.95
8.0.30.0110.00417.29
8.0.20.0140.00717.40
8.0.10.0050.00217.07
8.0.00.0100.00616.87
7.4.330.0020.00216.71
7.4.320.0000.00616.55
7.4.300.0000.00616.61
7.4.290.0000.00716.49
7.4.280.0050.00316.48
7.4.270.0070.00016.37
7.4.260.0030.00316.54
7.4.250.0000.00716.57
7.4.240.0040.00416.46
7.4.230.0070.00016.48
7.4.220.0070.01016.64
7.4.210.0050.01116.57
7.4.200.0040.00416.71
7.4.160.0040.01116.66
7.4.150.0080.00917.40
7.4.140.0100.00717.86
7.4.130.0090.00816.36
7.4.120.0140.00816.47
7.4.110.0090.00916.48
7.4.100.0090.01216.49
7.4.90.0200.03316.58
7.4.80.0060.01119.39
7.4.70.0100.01016.33
7.4.60.0060.01616.53
7.4.50.0030.00916.36
7.4.40.0100.00716.56
7.4.30.0150.00316.73
7.4.00.0030.01314.81
7.3.330.0030.00313.37
7.3.320.0020.00313.38
7.3.310.0070.00016.40
7.3.300.0000.00716.39
7.3.290.0030.00316.28
7.3.280.0060.01016.39
7.3.270.0090.00917.40
7.3.260.0070.01016.48
7.3.250.0100.00816.49
7.3.240.0110.00816.53
7.3.230.0090.01216.39
7.3.210.0060.01216.22
7.3.200.0040.01216.39
7.3.190.0130.00316.34
7.3.180.0110.00716.62
7.3.170.0130.00916.56
7.3.160.0060.00916.39
7.3.10.0000.01516.48
7.3.00.0080.00416.70
7.2.330.0150.00416.43
7.2.320.0180.00616.51
7.2.310.0110.00516.71
7.2.300.0060.01216.61
7.2.290.0060.01116.69
7.2.130.0100.00316.61
7.2.120.0120.00316.84
7.2.110.0090.00616.99
7.2.100.0040.00816.71
7.2.90.0100.00316.78
7.2.80.0030.00616.43
7.2.70.0040.01116.57
7.2.60.0030.01116.88
7.2.50.0110.00016.74
7.2.40.0030.00917.04
7.2.30.0110.00416.86
7.2.20.0000.01316.86
7.2.10.0100.00717.03
7.2.00.0070.00716.98
7.1.250.0030.00615.80
7.1.200.0040.00715.78
7.1.70.0030.00617.12
7.1.60.0070.01719.36
7.1.50.0070.01316.95
7.1.00.0030.07722.48
7.0.200.0000.00816.57
7.0.80.0070.08020.02
7.0.70.0530.07019.89
7.0.60.0430.08020.06
7.0.50.0370.07320.39
7.0.40.0200.04320.03
7.0.30.0070.09020.00
7.0.20.0070.04320.14
7.0.10.0070.08320.02
7.0.00.0100.04720.14
5.6.280.0000.03321.00
5.6.230.0070.08020.72
5.6.220.0100.07320.62
5.6.210.0100.07020.75
5.6.200.0170.07721.05
5.6.190.0030.05321.12
5.6.180.0100.07721.04
5.6.170.0100.07721.02
5.6.160.0170.07021.05
5.6.150.0070.08320.96
5.6.140.0130.07321.04
5.6.130.0200.06721.03
5.6.120.0100.07721.17
5.6.110.0130.07720.95
5.6.100.0000.08020.94
5.6.90.0170.04721.09
5.6.80.0200.07320.35
5.6.70.0070.07720.43
5.6.60.0100.08020.48
5.6.50.0100.06720.44
5.6.40.0170.06720.38
5.6.30.0100.06720.48
5.6.20.0000.05020.31
5.6.10.0070.08320.53
5.6.00.0070.07320.40
5.5.370.0000.08320.58
5.5.360.0100.04320.35
5.5.350.0130.06720.40
5.5.340.0030.08720.75
5.5.330.0030.05020.89
5.5.320.0030.06720.64
5.5.310.0170.07020.77
5.5.300.0170.07020.65
5.5.290.0030.08020.93
5.5.280.0070.08320.77
5.5.270.0130.06720.80
5.5.260.0030.08320.87
5.5.250.0170.06720.61
5.5.240.0130.06320.27
5.5.230.0030.05020.19
5.5.220.0130.06720.02
5.5.210.0230.06320.28
5.5.200.0070.08320.11
5.5.190.0130.07020.13
5.5.180.0030.05320.00
5.5.160.0070.08020.22
5.5.150.0000.07320.24
5.5.140.0000.04720.11
5.5.130.0070.05020.12
5.5.120.0100.06320.27
5.5.110.0030.07020.18
5.5.100.0100.08020.11
5.5.90.0030.05020.10
5.5.80.0030.08020.07
5.5.70.0070.06019.97
5.5.60.0130.07020.07
5.5.50.0030.07320.14
5.5.40.0070.07720.06
5.5.30.0030.08020.03
5.5.20.0130.07020.05
5.5.10.0130.06320.07
5.5.00.0130.07320.13

preferences:
53.94 ms | 401 KiB | 5 Q