3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A implements Stringable { private $value = 'a'; public function __toString() { return $this->value; } } $a = new A(); var_dump($a, (string) $a, is_string($a), $a instanceof Stringable);

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.0120.00318.43
8.3.50.0120.00316.43
8.3.40.0070.00718.70
8.3.30.0120.00318.80
8.3.20.0000.00824.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.180.0150.00025.92
8.2.170.0070.00719.07
8.2.160.0100.00722.96
8.2.150.0030.00625.66
8.2.140.0050.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00226.16
8.2.110.0080.00322.29
8.2.100.0040.00717.72
8.2.90.0070.00419.22
8.2.80.0060.00317.97
8.2.70.0080.00017.63
8.2.60.0070.00017.93
8.2.50.0000.00819.22
8.2.40.0080.00020.07
8.2.30.0050.00218.02
8.2.20.0070.00018.16
8.2.10.0000.00719.24
8.2.00.0000.00719.32
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00422.23
8.1.230.0070.00417.82
8.1.220.0000.00917.74
8.1.210.0030.00718.77
8.1.200.0060.00317.35
8.1.190.0050.00317.35
8.1.180.0090.00018.10
8.1.170.0040.00418.66
8.1.160.0040.00418.84
8.1.150.0030.00718.89
8.1.140.0040.00418.80
8.1.130.0080.00020.30
8.1.120.0040.00417.50
8.1.110.0030.00617.45
8.1.100.0040.00417.44
8.1.90.0030.00317.33
8.1.80.0040.00417.48
8.1.70.0070.00017.31
8.1.60.0000.00917.44
8.1.50.0030.00617.46
8.1.40.0040.00417.50
8.1.30.0060.00317.69
8.1.20.0000.00717.60
8.1.10.0030.00517.47
8.1.00.0030.00517.39
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0050.00318.37
8.0.270.0030.00318.05
8.0.260.0000.00618.55
8.0.250.0060.00016.93
8.0.240.0030.00316.99
8.0.230.0040.00416.98
8.0.220.0000.00716.89
8.0.210.0000.00716.88
8.0.200.0000.00716.93
8.0.190.0000.00816.95
8.0.180.0040.00416.82
8.0.170.0080.00016.82
8.0.160.0030.00516.78
8.0.150.0040.00416.83
8.0.140.0020.00516.77
8.0.130.0030.00313.30
8.0.120.0040.00416.79
8.0.110.0040.00416.87
8.0.100.0040.00416.70
8.0.90.0000.00716.84
8.0.80.0150.00616.89
8.0.70.0040.01216.87
8.0.60.0070.01116.84
8.0.50.0110.00716.77
8.0.30.0130.00916.84
8.0.20.0030.01716.90
8.0.10.0090.01217.05
8.0.00.0030.01317.04
7.4.330.0000.00515.55
7.4.320.0000.00616.45
7.4.300.0030.00316.42
7.4.290.0050.00216.38
7.4.280.0000.00816.34
7.4.270.0000.00616.42
7.4.260.0030.00316.48
7.4.250.0000.00916.39
7.4.240.0040.00416.46
7.4.230.0000.00716.36
7.4.220.0000.00716.27
7.4.210.0070.01016.45
7.4.200.0160.00416.59
7.4.190.0060.00916.45
7.4.180.0070.01116.48
7.4.160.0030.01716.41
7.4.150.0070.00716.47
7.4.140.0100.01016.32
7.4.130.0100.00616.50
7.4.120.0030.01816.42
7.4.110.0090.00616.57
7.4.100.0130.00316.42
7.4.90.0140.01016.39
7.4.80.0100.00616.41
7.4.70.0040.01216.43
7.4.60.0070.01416.41
7.4.50.0000.01616.39
7.4.40.0080.00816.24
7.4.30.0160.00016.39
7.4.20.0080.01216.41
7.4.10.0040.01216.48
7.4.00.0060.00916.30
7.3.330.0080.00016.23
7.3.320.0070.00013.02
7.3.310.0030.00316.28
7.3.300.0030.00316.07
7.3.290.0150.00016.25
7.3.280.0100.01016.18
7.3.270.0130.00316.21
7.3.260.0080.00816.27
7.3.250.0100.01016.15
7.3.240.0030.01616.25
7.3.230.0090.01016.22
7.3.220.0060.01316.14
7.3.210.0070.01116.16
7.3.200.0090.00616.16
7.3.190.0090.00616.15
7.3.180.0100.00916.26
7.3.170.0100.00716.17
7.3.160.0030.01616.25
7.3.150.0120.00616.31
7.3.140.0080.01116.24
7.3.130.0100.01016.20
7.3.120.0100.00716.17
7.3.110.0160.00016.09
7.3.100.0130.00616.11
7.3.90.0060.01316.41
7.3.80.0100.00616.15
7.3.70.0100.01016.36
7.3.60.0080.01216.35
7.3.50.0080.01216.32
7.3.40.0100.00916.35
7.3.30.0130.00616.26
7.3.20.0000.01716.39
7.3.10.0100.01016.27
7.3.00.0240.00716.22

preferences:
47.66 ms | 401 KiB | 5 Q