3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Canary extends stdClass { public function __construct(public string $name) { } function __destruct() { echo $this->name."\n"; } } $canary = new Canary('canary'); $map = new \WeakMap(); $map[$canary] = 'foo'; echo 1; unset($canary); echo 2;

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.4.120.0120.00820.46
8.4.110.0110.01022.52
8.4.100.0120.00820.54
8.4.90.0130.00720.71
8.4.80.0110.00919.43
8.4.70.0120.00718.01
8.4.60.0160.00517.67
8.4.50.0100.00917.77
8.4.40.0040.00419.57
8.4.30.0130.00720.83
8.4.20.0090.00320.59
8.4.10.0060.00323.84
8.3.250.0070.00719.03
8.3.240.0050.00319.05
8.3.230.0130.00616.67
8.3.220.0060.00217.35
8.3.210.0090.00918.28
8.3.200.0130.00618.98
8.3.190.0060.00216.33
8.3.180.0100.00816.97
8.3.170.0090.00919.11
8.3.160.0060.00622.68
8.3.150.0140.00319.08
8.3.140.0090.00919.02
8.3.130.0040.00418.31
8.3.120.0000.00818.88
8.3.110.0080.00018.45
8.3.100.0070.00318.34
8.3.90.0060.00326.77
8.3.80.0030.00616.75
8.3.70.0120.00316.58
8.3.60.0090.00618.30
8.3.50.0130.00618.44
8.3.40.0060.00920.34
8.3.30.0110.00418.75
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0090.01020.50
8.2.280.0120.00818.43
8.2.270.0130.00622.48
8.2.260.0040.01416.54
8.2.250.0070.00718.23
8.2.240.0110.00717.15
8.2.230.0130.00320.94
8.2.220.0070.01324.06
8.2.210.0030.00626.77
8.2.200.0030.00616.50
8.2.190.0060.01116.75
8.2.180.0130.01025.92
8.2.170.0120.00319.09
8.2.160.0000.01422.96
8.2.150.0050.00225.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.02
8.2.110.0040.01421.10
8.2.100.0060.00617.78
8.2.90.0040.00419.46
8.2.80.0000.00820.35
8.2.70.0030.00617.63
8.2.60.0060.00317.63
8.2.50.0040.00417.63
8.2.40.0000.00819.34
8.2.30.0080.00019.12
8.2.20.0070.00020.63
8.2.10.0030.00518.29
8.2.00.0040.00419.19
8.1.330.0090.00621.73
8.1.320.0090.01116.11
8.1.310.0040.01118.25
8.1.300.0030.00617.92
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00622.19
8.1.230.0080.00322.70
8.1.220.0040.00417.74
8.1.210.0000.00818.92
8.1.200.0060.00317.23
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0040.00418.66
8.1.160.0050.00218.88
8.1.150.0040.00418.57
8.1.140.0000.00717.51
8.1.130.0070.00018.57
8.1.120.0000.00818.61
8.1.110.0040.00418.69
8.1.100.0000.00818.63
8.1.90.0040.00418.71
8.1.80.0030.00618.66
8.1.70.0000.00718.64
8.1.60.0000.00718.75
8.1.50.0000.00818.82
8.1.40.0000.00718.82
8.1.30.0060.00318.77
8.1.20.0050.00218.76
8.1.10.0060.00320.52
8.1.00.0040.00420.48
8.0.300.0000.00720.16
8.0.290.0040.00416.75
8.0.280.0080.00018.51
8.0.270.0050.00318.02
8.0.260.0000.00719.72
8.0.250.0080.00019.86
8.0.240.0000.00719.75
8.0.230.0040.00419.86
8.0.220.0040.00419.78
8.0.210.0040.00417.97
8.0.200.0070.00019.91
8.0.190.0030.00318.07
8.0.180.0030.00318.08
8.0.170.0060.00018.13
8.0.160.0000.00718.07
8.0.150.0070.00017.88
8.0.140.0030.00317.93
8.0.130.0060.00017.91
8.0.120.0030.00317.83
8.0.110.0070.00017.96
8.0.100.0030.00318.04
8.0.90.0000.00717.84
8.0.80.0000.00717.98
8.0.70.0000.00718.07
8.0.60.0030.00317.93
8.0.50.0000.00717.94
8.0.30.0030.00317.85
8.0.20.0000.00817.88
8.0.10.0040.00418.05

preferences:
32.27 ms | 403 KiB | 5 Q