3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { /** @var int */ public static $bar = 0; public ?string $test = null; /** @psalm-external-mutation-free */ public function setTest(string $value) : void { $this->test = $value; ++self::$bar; } } class Bar { /** @psalm-mutation-free */ function test() : void { $foo = new Foo(); $foo->setTest('abcd'); } } $bar = new Bar(); $a = Foo::$bar; /** @psalm-suppress UnusedMethodCall irrelevant */ $bar->test(); $b = Foo::$bar; assert($a === $b);

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.5.10.0090.01020.17
8.5.00.0120.01522.73
8.4.150.0020.00014.05
8.4.140.0110.00917.80
8.4.130.0050.00317.98
8.4.120.0130.00720.71
8.4.110.0050.00322.49
8.4.100.0120.00017.89
8.4.90.0110.00617.68
8.4.80.0120.00317.79
8.4.70.0050.00317.84
8.4.60.0120.00818.81
8.4.50.0080.01117.74
8.4.40.0090.00019.80
8.4.30.0040.00420.38
8.4.20.0120.00619.66
8.4.10.0080.00022.26
8.3.280.0140.00718.64
8.3.270.0140.00516.68
8.3.260.0110.01016.54
8.3.250.0120.00719.12
8.3.240.0130.00716.57
8.3.230.0120.00716.87
8.3.220.0020.00617.14
8.3.210.0080.00716.94
8.3.200.0060.00316.61
8.3.190.0100.01019.20
8.3.180.0130.00716.63
8.3.170.0030.01216.82
8.3.160.0040.01516.58
8.3.150.0030.01719.17
8.3.140.0070.01116.53
8.3.130.0060.00318.61
8.3.120.0150.00018.97
8.3.110.0060.00320.94
8.3.100.0030.00624.06
8.3.90.0030.01726.77
8.3.80.0030.00718.43
8.3.70.0110.00416.63
8.3.60.0140.00718.34
8.3.50.0100.00720.07
8.3.40.0030.01721.98
8.3.30.0090.00618.74
8.3.20.0070.00024.18
8.3.10.0060.00324.66
8.3.00.0050.00326.16
8.2.290.0090.01020.43
8.2.280.0040.00618.46
8.2.270.0120.00316.68
8.2.260.0110.00720.46
8.2.250.0060.00316.91
8.2.240.0080.00018.93
8.2.230.0030.00722.58
8.2.220.0000.00837.54
8.2.210.0000.00726.77
8.2.200.0060.00318.88
8.2.190.0140.00016.58
8.2.180.0070.01125.92
8.2.170.0080.00818.91
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0090.00026.16
8.2.110.0090.00020.41
8.2.100.0060.00617.84
8.2.90.0000.00917.88
8.2.80.0050.00318.73
8.2.70.0050.00317.63
8.2.60.0080.00017.75
8.2.50.0060.00318.04
8.2.40.0040.00420.07
8.2.30.0060.00318.17
8.2.20.0000.00720.47
8.2.10.0040.00418.06
8.2.00.0000.00719.24
8.1.330.0110.00818.46
8.1.320.0120.00816.37
8.1.310.0040.00416.86
8.1.300.0030.00616.40
8.1.290.0030.00630.84
8.1.280.0100.00325.92
8.1.270.0060.00323.99
8.1.260.0030.00626.35
8.1.250.0030.00528.09
8.1.240.0090.00017.48
8.1.230.0110.00019.08
8.1.220.0040.00417.76
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0060.00317.10
8.1.180.0000.00818.10
8.1.170.0000.00817.62
8.1.160.0040.00418.83
8.1.150.0040.00418.64
8.1.140.0070.00017.29
8.1.130.0070.00018.88
8.1.120.0040.00317.31
8.1.110.0040.00417.42
8.1.100.0040.00417.29
8.1.90.0000.00817.36
8.1.80.0100.00017.34
8.1.70.0120.00317.24
8.1.60.0090.00917.48
8.1.50.0140.00317.29
8.1.40.0090.00917.41
8.1.30.0140.00517.57
8.1.20.0150.00317.53
8.1.10.0140.00417.57
8.1.00.0120.00617.48
8.0.300.0000.00818.77
8.0.290.0080.00016.88
8.0.280.0000.00718.45
8.0.270.0070.00016.89
8.0.260.0000.00618.39
8.0.250.0000.00716.93
8.0.240.0050.00316.98
8.0.230.0030.00316.94
8.0.220.0050.00216.91
8.0.210.0100.00016.74
8.0.200.0000.01516.80
8.0.190.0030.01216.91
8.0.180.0100.00516.77
8.0.170.0150.00016.82
8.0.160.0070.00716.92
8.0.150.0070.00716.71
8.0.140.0080.00616.72
8.0.130.0060.00916.82
8.0.120.0120.00216.86
8.0.110.0100.00516.91
8.0.100.0070.00716.80
8.0.90.0090.00616.76
8.0.80.0070.00716.80
8.0.70.0050.01016.72
8.0.60.0130.00216.93
8.0.50.0040.00416.88
8.0.30.0020.00516.87
8.0.20.0060.00816.91
8.0.10.0070.00716.91
7.4.330.0020.00215.55
7.4.320.0030.00316.61
7.4.300.0030.00316.58
7.4.290.0020.00716.43
7.4.280.0080.00416.49
7.4.270.0160.00016.50
7.4.260.0080.00416.46
7.4.250.0070.00716.58
7.4.240.0100.00316.62
7.4.230.0120.00216.41
7.4.220.0140.00016.52
7.4.210.0090.00316.49
7.4.200.0080.00616.49
7.4.190.0130.00016.60
7.4.180.0100.00316.53
7.4.160.0110.00416.64
7.4.150.0070.00716.37
7.4.140.0120.00016.30
7.4.130.0080.00516.30
7.4.120.0060.00916.46
7.4.110.0070.00716.36
7.4.100.0110.00416.40
7.4.90.0100.00516.42
7.4.80.0140.00016.45
7.4.70.0070.00716.41
7.4.60.0100.00316.38
7.4.50.0040.00816.19
7.4.40.0090.00616.37
7.4.30.0090.00616.37
7.4.20.0110.00416.45
7.4.10.0090.00616.47
7.4.00.0040.00916.46

preferences:
39.38 ms | 403 KiB | 5 Q