3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test(&$arr) { static $i; var_dump(self::$i); if (!isset(self::$i)) { self::$i = &$arr[0]; } } } $arr = [1, 2, 3]; $a = new A(); $a->test($arr); $a->test($arr);

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.0060.00918.36
8.3.50.0060.00918.30
8.3.40.0090.00618.97
8.3.30.0110.01118.71
8.3.20.0040.00420.09
8.3.10.0060.00318.82
8.3.00.0040.00820.71
8.2.180.0060.00916.75
8.2.170.0110.00422.96
8.2.160.0120.00322.30
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00721.04
8.2.120.0090.00026.35
8.2.110.0030.00720.98
8.2.100.0090.00318.05
8.2.90.0080.00019.27
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0040.00418.09
8.2.40.0000.00920.59
8.2.30.0000.00719.43
8.2.20.0000.00717.80
8.2.10.0000.00718.18
8.2.00.0040.00418.10
8.1.280.0060.00925.92
8.1.270.0100.01023.78
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0000.00922.06
8.1.230.0070.00417.89
8.1.220.0040.00417.74
8.1.210.0030.00918.77
8.1.200.0090.00017.22
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0090.00418.53
8.1.160.0040.00420.67
8.1.150.0040.00420.72
8.1.140.0040.00419.59
8.1.130.0000.00717.68
8.1.120.0000.00717.43
8.1.110.0040.00417.48
8.1.100.0050.00317.45
8.1.90.0040.00417.39
8.1.80.0040.00417.38
8.1.70.0090.00017.39
8.1.60.0040.00417.48
8.1.50.0000.00817.48
8.1.40.0030.00617.50
8.1.30.0080.00017.67
8.1.20.0040.00417.51
8.1.10.0060.00317.63
8.1.00.0000.00717.51
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.38
8.0.270.0000.00817.26
8.0.260.0060.00017.12
8.0.250.0030.00316.92
8.0.240.0000.00617.05
8.0.230.0000.00716.94
8.0.220.0000.00716.86
8.0.210.0000.00716.86
8.0.200.0060.00017.05
8.0.190.0040.00416.97
8.0.180.0000.00717.03
8.0.170.0080.00017.02
8.0.160.0020.00516.83
8.0.150.0000.00716.79
8.0.140.0060.00316.86
8.0.130.0000.00713.36
8.0.120.0000.00816.92
8.0.110.0000.00816.86
8.0.100.0050.00216.91
8.0.90.0040.00416.80
8.0.80.0090.00616.93
8.0.70.0040.00416.84
8.0.60.0000.00816.94
8.0.50.0000.00716.95
8.0.30.0070.01117.13
8.0.20.0130.00617.40
8.0.10.0090.00016.96
8.0.00.0090.00916.70
7.4.330.0020.00216.71
7.4.320.0060.00016.53
7.4.300.0000.00616.45
7.4.290.0000.00616.40
7.4.280.0000.00816.52
7.4.270.0070.00016.50
7.4.260.0000.00916.62
7.4.250.0040.00416.35
7.4.240.0070.00016.59
7.4.230.0000.00716.42
7.4.220.0100.01616.62
7.4.210.0110.00316.53
7.4.200.0030.00316.55
7.4.160.0100.00716.61
7.4.150.0090.00917.40
7.4.140.0140.00617.86
7.4.130.0030.01516.58
7.4.120.0080.00816.66
7.4.110.0110.00516.40
7.4.100.0130.00416.50
7.4.90.0200.00316.48
7.4.80.0160.01219.39
7.4.70.0110.00716.65
7.4.60.0200.00016.34
7.4.50.0030.01316.33
7.4.40.0040.01216.75
7.4.30.0070.01016.56
7.4.10.0090.00614.97
7.4.00.0080.00815.02
7.3.330.0000.00613.32
7.3.320.0030.00313.40
7.3.310.0040.00416.35
7.3.300.0050.00216.39
7.3.290.0000.00716.36
7.3.280.0070.01116.34
7.3.270.0140.00317.40
7.3.260.0140.00416.34
7.3.250.0090.01016.42
7.3.240.0130.00616.48
7.3.230.0130.00316.39
7.3.210.0070.01016.37
7.3.200.0140.00716.29
7.3.190.0060.00916.48
7.3.180.0050.01116.57
7.3.170.0110.00516.49
7.3.160.0120.00416.42
7.3.130.0030.01014.62
7.3.120.0100.00614.78
7.3.110.0060.00614.57
7.3.100.0030.01214.96
7.3.90.0070.00714.86
7.3.80.0080.00914.52
7.3.70.0040.00414.75
7.3.60.0100.00314.71
7.3.50.0100.00314.48
7.3.40.0040.00714.84
7.3.30.0040.00814.53
7.3.20.0060.00616.65
7.3.10.0070.00716.67
7.3.00.0060.00916.34
7.2.330.0090.00916.61
7.2.320.0060.01316.46
7.2.310.0060.01216.73
7.2.300.0100.00716.75
7.2.290.0160.00016.78
7.2.260.0030.01415.07
7.2.250.0070.01115.21
7.2.240.0040.01115.05
7.2.230.0110.00014.84
7.2.220.0040.01414.93
7.2.210.0000.01014.63
7.2.200.0110.00415.13
7.2.190.0110.00414.76
7.2.180.0090.00914.99
7.2.170.0090.00315.00
7.2.160.0060.00914.97
7.2.150.0000.01416.72
7.2.140.0130.00016.93
7.2.130.0070.00716.95
7.2.120.0060.00917.00
7.2.110.0100.00016.97
7.2.100.0030.01416.99
7.2.90.0110.00316.90
7.2.80.0110.00416.93
7.2.70.0060.00617.03
7.2.60.0070.00716.95
7.2.50.0030.00916.85
7.2.40.0070.01016.71
7.2.30.0000.00916.97
7.2.20.0060.00616.84
7.2.10.0000.01616.84
7.2.00.0080.00817.97
7.1.330.0070.00715.61
7.1.320.0070.01015.48
7.1.310.0100.00315.84
7.1.300.0060.01215.82
7.1.290.0000.00915.77
7.1.280.0070.01015.63
7.1.270.0070.00415.43
7.1.260.0040.00715.48
7.1.250.0030.00715.70
7.1.240.0070.00715.77
7.1.230.0060.00615.66
7.1.220.0120.00315.70
7.1.210.0030.00715.63
7.1.200.0070.00815.63
7.1.190.0000.01415.68
7.1.180.0100.00315.67
7.1.170.0080.00015.59
7.1.160.0070.00715.43
7.1.150.0040.00415.60
7.1.140.0130.00315.59
7.1.130.0100.00315.77
7.1.120.0060.00915.63
7.1.110.0140.00015.69
7.1.100.0050.00716.67
7.1.90.0060.00915.71
7.1.80.0110.00315.65
7.1.70.0000.01016.22
7.1.60.0090.00817.49
7.1.50.0110.00516.37
7.1.40.0070.00715.73
7.1.30.0060.00615.84
7.1.20.0030.00715.74
7.1.10.0070.00715.57
7.1.00.0030.04319.12
7.0.330.0080.00015.40
7.0.320.0090.00615.57
7.0.310.0040.00815.15
7.0.300.0040.00715.44
7.0.290.0000.01015.30
7.0.280.0030.00915.45
7.0.270.0070.00415.45
7.0.260.0030.00915.55
7.0.250.0030.00515.44
7.0.240.0120.00015.49
7.0.230.0090.00615.58
7.0.220.0080.00615.19
7.0.210.0050.00315.16
7.0.200.0080.01014.96
7.0.190.0070.00415.21
7.0.180.0070.00715.39
7.0.170.0000.01215.43
7.0.160.0060.00315.33
7.0.150.0040.01115.40
7.0.140.0060.00615.30
7.0.130.0060.00915.58
7.0.120.0130.00015.29
7.0.110.0070.01015.46
7.0.100.0070.00715.27
7.0.90.0040.01115.38
7.0.80.0080.00015.28
7.0.70.0000.01215.35
7.0.60.0130.02417.51
7.0.50.0110.02316.55
7.0.40.0070.04716.62
7.0.30.0030.03116.91
7.0.20.0170.04516.80
7.0.10.0030.03916.65
7.0.00.0070.03616.75
5.6.400.0140.00014.67
5.6.390.0060.00914.11
5.6.380.0090.00614.61
5.6.370.0000.01914.73
5.6.360.0080.00614.12
5.6.350.0040.01114.35
5.6.340.0000.01014.48
5.6.330.0030.00614.44
5.6.320.0080.00314.41
5.6.310.0000.01113.82
5.6.300.0050.00514.53
5.6.290.0070.00414.59
5.6.280.0070.03517.64
5.6.270.0060.00314.11
5.6.260.0080.00014.20
5.6.250.0040.01114.31
5.6.240.0030.00614.48
5.6.230.0100.00314.26
5.6.220.0060.00614.35
5.6.210.0070.02417.46
5.6.200.0030.04416.31
5.6.190.0070.03217.38
5.6.180.0140.02717.50
5.6.170.0150.02717.37
5.6.160.0030.04617.36
5.6.150.0000.03616.22
5.6.140.0020.04416.28
5.6.130.0100.04416.19
5.6.120.0080.04117.63
5.6.110.0090.03717.51
5.6.100.0070.04917.68
5.6.90.0030.02817.58
5.6.80.0080.04017.39
5.6.70.0000.01514.41
5.6.60.0110.00014.19
5.6.50.0040.01114.14
5.6.40.0060.00914.35
5.6.30.0060.00313.96
5.6.20.0000.00914.37
5.6.10.0000.01714.23
5.6.00.0000.01514.23
5.5.380.0030.01014.20
5.5.370.0060.00614.19
5.5.360.0070.00314.51
5.5.350.0220.03917.43
5.5.340.0070.04216.13
5.5.330.0050.04317.37
5.5.320.0270.02417.27
5.5.310.0160.02417.34
5.5.300.0090.02316.21
5.5.290.0030.03516.26
5.5.280.0050.02417.44
5.5.270.0030.03017.69
5.5.260.0080.04717.58
5.5.250.0070.04317.25
5.5.240.0050.03717.19
5.5.230.0000.01314.29
5.5.220.0040.00814.37
5.5.210.0110.00414.27
5.5.200.0060.00914.25
5.5.190.0070.00714.10
5.5.180.0030.01014.28
5.5.170.0040.00814.30
5.5.160.0040.00414.32
5.5.150.0070.00714.26
5.5.140.0030.00913.94
5.5.130.0000.01414.41
5.5.120.0060.00614.29
5.5.110.0070.00714.34
5.5.100.0040.01114.31
5.5.90.0040.00814.34
5.5.80.0090.00614.29
5.5.70.0060.01214.32
5.5.60.0080.00813.87
5.5.50.0060.00314.30
5.5.40.0000.01714.07
5.5.30.0080.00814.26
5.5.20.0000.01814.13
5.5.10.0070.00714.18
5.5.00.0030.00814.35

preferences:
53.86 ms | 400 KiB | 5 Q