3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $bar = null; public function &getBar() { if ($this->value === null) { $this->bar[] = 'init'; } return $this->bar; } } $obj = new foo; $myValue = &$obj->getBar(); $myValue[] = 123; var_dump($obj->bar);

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.0040.01116.63
8.3.50.0050.01322.05
8.3.40.0070.00718.56
8.3.30.0110.00418.95
8.3.20.0000.00920.39
8.3.10.0080.00021.60
8.3.00.0080.00019.38
8.2.180.0110.01116.88
8.2.170.0000.01522.96
8.2.160.0170.00322.25
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00619.68
8.2.110.0030.00619.28
8.2.100.0090.00317.75
8.2.90.0000.00919.07
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0000.00819.75
8.2.50.0050.00318.07
8.2.40.0040.00419.95
8.2.30.0050.00318.13
8.2.20.0040.00417.61
8.2.10.0040.00417.96
8.2.00.0000.00817.67
8.1.280.0070.01125.92
8.1.270.0060.00320.73
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00722.26
8.1.230.0070.00417.52
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0080.00017.35
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0000.00818.42
8.1.160.0040.00421.89
8.1.150.0000.00718.80
8.1.140.0000.00717.39
8.1.130.0000.00717.74
8.1.120.0050.00317.29
8.1.110.0000.00817.39
8.1.100.0000.00817.34
8.1.90.0040.00317.47
8.1.80.0040.00417.34
8.1.70.0000.00717.38
8.1.60.0030.00517.61
8.1.50.0030.00517.53
8.1.40.0050.00317.43
8.1.30.0040.00417.71
8.1.20.0040.00417.48
8.1.10.0070.00017.53
8.1.00.0030.00617.46
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.34
8.0.270.0000.00716.76
8.0.260.0060.00017.11
8.0.250.0040.00416.80
8.0.240.0000.00716.82
8.0.230.0050.00316.94
8.0.220.0030.00316.86
8.0.210.0070.00016.86
8.0.200.0000.00716.95
8.0.190.0000.00716.99
8.0.180.0050.00216.90
8.0.170.0040.00416.91
8.0.160.0080.00016.96
8.0.150.0040.00416.89
8.0.140.0000.00716.84
8.0.130.0030.00313.38
8.0.120.0000.00816.77
8.0.110.0040.00416.89
8.0.100.0040.00416.89
8.0.90.0000.00716.92
8.0.80.0100.00716.85
8.0.70.0000.00816.88
8.0.60.0050.00316.72
8.0.50.0000.00816.76
8.0.30.0120.01016.87
8.0.20.0120.00717.40
8.0.10.0000.00716.95
8.0.00.0120.00516.76
7.4.330.0060.00015.03
7.4.320.0000.00716.48
7.4.300.0030.00316.51
7.4.290.0030.00516.61
7.4.280.0030.00516.50
7.4.270.0040.00416.48
7.4.260.0000.00716.61
7.4.250.0030.00316.57
7.4.240.0050.00416.50
7.4.230.0030.00316.48
7.4.220.0060.01316.70
7.4.210.0070.01216.52
7.4.200.0000.00816.42
7.4.160.0090.00616.53
7.4.150.0150.00317.40
7.4.140.0060.01117.86
7.4.130.0130.00516.53
7.4.120.0060.01216.56
7.4.110.0170.00816.44
7.4.100.0040.01416.52
7.4.90.0030.01316.35
7.4.80.0030.01619.39
7.4.70.0160.00016.55
7.4.60.0130.00316.54
7.4.50.0030.00316.63
7.4.40.0190.00316.46
7.4.30.0070.01416.50
7.4.00.0070.01114.83
7.3.330.0000.00613.38
7.3.320.0100.00313.21
7.3.310.0070.00016.43
7.3.300.0030.00316.38
7.3.290.0040.00416.32
7.3.280.0080.00716.34
7.3.270.0030.01317.40
7.3.260.0090.00916.52
7.3.250.0130.00816.46
7.3.240.0080.00816.22
7.3.230.0060.01216.39
7.3.210.0030.01316.45
7.3.200.0090.01619.39
7.3.190.0100.00616.57
7.3.180.0060.00916.24
7.3.170.0100.01016.28
7.3.160.0140.00716.39
7.3.10.0050.01216.37
7.3.00.0090.01116.55
7.2.330.0100.01316.74
7.2.320.0060.01216.55
7.2.310.0060.01516.52
7.2.300.0110.00816.68
7.2.290.0030.01416.71
7.2.130.0130.00616.78
7.2.120.0080.00716.45
7.2.110.0050.01016.63
7.2.100.0120.00416.68
7.2.90.0120.00616.50
7.2.80.0110.00716.35
7.2.70.0080.00716.49
7.2.60.0060.00816.40
7.2.50.0080.00916.35
7.2.40.0110.00716.49
7.2.30.0050.00916.57
7.2.20.0080.00616.46
7.2.10.0090.00916.32
7.2.00.0070.00917.45
7.1.250.0080.00615.43
7.1.100.0110.01118.08
7.1.70.0040.00417.24
7.1.60.0090.01519.50
7.1.50.0140.01016.88
7.1.00.0130.06722.43
7.0.200.0040.00416.52
7.0.140.0030.06022.15
7.0.60.0070.05319.98
7.0.50.0100.04317.84
7.0.40.0100.08320.26
7.0.30.0300.05020.26
7.0.20.0270.08020.12
7.0.10.0270.07020.41
7.0.00.0000.07320.16
5.6.280.0030.07321.11
5.6.210.0070.08320.76
5.6.200.0170.07718.18
5.6.190.0030.04320.54
5.6.180.0330.07020.46
5.6.170.0330.07020.46
5.6.160.0030.05320.71
5.6.150.0070.08318.17
5.6.140.0130.07318.19
5.6.130.0100.08018.30
5.6.120.0070.08320.97
5.6.110.0030.09021.03
5.6.100.0100.04720.98
5.6.90.0030.04320.99
5.6.80.0030.04020.39
5.6.70.0200.07320.28
5.5.350.0130.07720.43
5.5.340.0100.07717.92
5.5.330.0070.05320.56
5.5.320.0230.04720.22
5.5.310.0170.05320.30
5.5.300.0130.06318.08
5.5.290.0070.04018.02
5.5.280.0030.05720.80
5.5.270.0070.06720.76
5.5.260.0030.08020.79
5.5.250.0070.08320.50
5.5.240.0170.07720.19
5.4.450.0600.06019.61
5.4.440.0900.06719.45
5.4.430.1030.04319.57
5.4.420.0130.07019.18
5.4.410.1000.05019.48
5.4.400.0130.06018.84
5.4.390.0170.05318.77
5.4.380.0100.06018.68
5.4.370.0270.06318.55
5.4.360.0130.06018.70
5.4.350.0130.05718.76
5.4.340.0200.05018.57
5.4.320.0170.05718.71
5.4.310.0230.05318.77
5.4.300.0230.04718.69
5.4.290.0300.04018.57
5.4.280.0230.04718.45
5.4.270.0170.05018.48
5.4.260.0130.06318.70
5.4.250.0170.05718.71
5.4.240.0270.07718.79
5.4.230.0170.05318.68
5.4.220.0230.04718.70
5.4.210.0200.04718.75
5.4.200.0170.05016.57
5.4.190.0230.04718.74
5.4.180.0200.05018.53
5.4.170.0170.05718.42
5.4.160.0270.04318.52
5.4.150.0230.04718.52
5.4.140.0300.06016.29
5.4.130.0130.05316.40
5.4.120.0170.07716.44
5.4.110.0130.05016.19
5.4.100.0130.05316.25
5.4.90.0100.05716.31
5.4.80.0170.04716.28
5.4.70.0200.04716.17
5.4.60.0170.05316.22
5.4.50.0130.05016.26
5.4.40.0030.06016.16
5.4.30.0130.05316.26
5.4.20.0200.06316.18
5.4.10.0230.04316.17
5.4.00.0100.05715.73
5.3.290.0270.04714.71
5.3.280.0070.06314.69
5.3.270.0170.05714.81
5.3.260.0270.05014.80
5.3.250.0130.05714.78
5.3.240.0230.05314.66
5.3.230.0170.05014.59
5.3.220.0170.05014.62
5.3.210.0170.05714.71
5.3.200.0170.06014.57
5.3.190.0170.05014.57
5.3.180.0230.05714.56
5.3.170.0230.04714.55
5.3.160.0170.05014.63
5.3.150.0130.05314.66
5.3.140.0200.04714.59
5.3.130.0170.05714.58
5.3.120.0230.05014.64
5.3.110.0070.06314.64
5.3.100.0130.05314.02
5.3.90.0230.04714.03
5.3.80.0100.05714.13
5.3.70.0130.05714.02
5.3.60.0230.04714.11
5.3.50.0200.04713.96
5.3.40.0170.05314.02
5.3.30.0030.06013.95
5.3.20.0100.05713.79
5.3.10.0130.05313.77
5.3.00.0330.03313.64
5.2.170.0130.04011.16
5.2.160.0130.04011.21
5.2.150.0100.04311.14
5.2.140.0170.03711.24
5.2.130.0100.04311.21
5.2.120.0130.04011.14
5.2.110.0200.03311.15
5.2.100.0070.04711.23
5.2.90.0170.03711.20
5.2.80.0200.03711.17
5.2.70.0100.04711.20
5.2.60.0130.04311.14
5.2.50.0200.05311.11
5.2.40.0130.04010.98
5.2.30.0170.05011.08
5.2.20.0130.05311.05
5.2.10.0170.03710.87
5.2.00.0130.04710.81
5.1.60.0170.0309.98
5.1.50.0100.03710.03
5.1.40.0130.0409.96
5.1.30.0070.04310.34
5.1.20.0170.03710.39
5.1.10.0130.03310.08
5.1.00.0130.03310.13
5.0.50.0030.0338.56
5.0.40.0100.0278.41
5.0.30.0000.0508.26
5.0.20.0030.0378.21
5.0.10.0070.0278.27
5.0.00.0030.0478.26
4.4.90.0030.0235.88
4.4.80.0030.0235.89
4.4.70.0070.0205.89
4.4.60.0030.0235.89
4.4.50.0030.0235.89
4.4.40.0100.0405.98
4.4.30.0100.0275.91
4.4.20.0030.0336.02
4.4.10.0070.0205.95
4.4.00.0030.0475.90
4.3.110.0100.0275.82
4.3.100.0030.0275.88
4.3.90.0070.0205.79
4.3.80.0030.0375.80
4.3.70.0000.0275.81
4.3.60.0170.0105.87
4.3.50.0030.0235.78
4.3.40.0000.0405.78
4.3.30.0070.0204.59
4.3.20.0030.0234.58
4.3.10.0070.0204.52
4.3.00.0130.0207.19

preferences:
73.91 ms | 401 KiB | 5 Q