3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Adapted from last example on http://nikic.github.io/2015/05/05/Internal-value-representation-in-PHP-7-part-1 $a = array(); // $a -> zend_array_1(refcount=1, value=[]) $b = $a; // $a, $b, -> zend_array_1(refcount=2, value=[]) $c = $b; // $a, $b, $c -> zend_array_1(refcount=3, value=[]) $x = $c; // $a, $b, $c, $x -> zend_array_1(refcount=4, value=[]) $d =& $c; $y =& $d; // $a, $b, $x -> zend_array_1(refcount=4, value=[]) // $c, $d, $y -> zend_reference_1(refcount=3) ---^ echo "Before\n"; debug_zval_dump($a); debug_zval_dump($b); debug_zval_dump($c); debug_zval_dump($d); $d[] = 1; // $a, $b, $x -> zend_array_1(refcount=3, value=[]) // $c, $d, $y -> zend_reference_1(refcount=3) -> zend_array_2(refcount=1, value=[1]) echo "After\n"; debug_zval_dump($a); debug_zval_dump($b); debug_zval_dump($c); debug_zval_dump($d);

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.00822.42
8.4.110.0130.00623.87
8.4.100.0150.00517.86
8.4.90.0110.00820.64
8.4.80.0150.00518.56
8.4.70.0130.00818.88
8.4.60.0120.00618.74
8.4.50.0100.01117.74
8.4.40.0150.00617.87
8.4.30.0080.01117.67
8.4.20.0070.01017.56
8.4.10.0070.01017.68
8.3.250.0130.00519.06
8.3.240.0060.00316.61
8.3.230.0100.00816.61
8.3.220.0080.00718.94
8.3.210.0070.00218.46
8.3.200.0090.00716.66
8.3.190.0110.00618.97
8.3.180.0110.00616.55
8.3.170.0050.00318.84
8.3.160.0120.00618.36
8.3.150.0070.01120.75
8.3.140.0050.00318.53
8.3.130.0080.00016.46
8.3.120.0090.00018.80
8.3.110.0030.00618.25
8.3.100.0090.00016.50
8.3.90.0040.01116.56
8.3.80.0060.00317.97
8.3.70.0080.01216.50
8.3.60.0090.01216.75
8.3.50.0090.01421.22
8.3.40.0070.01118.67
8.3.30.0150.00018.96
8.3.20.0090.00020.36
8.3.10.0000.00821.85
8.3.00.0090.01217.48
8.2.290.0050.00316.75
8.2.280.0120.00620.03
8.2.270.0110.00719.02
8.2.260.0050.00318.13
8.2.250.0080.00016.95
8.2.240.0070.01118.97
8.2.230.0030.00620.94
8.2.220.0060.00324.06
8.2.210.0080.00026.77
8.2.200.0000.01016.75
8.2.190.0140.00716.75
8.2.180.0150.00016.60
8.2.170.0080.00819.05
8.2.160.0110.00722.96
8.2.150.0040.00425.66
8.2.140.0180.00024.66
8.2.130.0130.00626.16
8.2.120.0080.00020.70
8.2.110.0060.00319.42
8.2.100.0090.00317.75
8.2.90.0000.00719.26
8.2.80.0050.00317.97
8.2.70.0080.00017.34
8.2.60.0060.00317.93
8.2.50.0030.00618.07
8.2.40.0030.00520.01
8.2.30.0040.00417.99
8.2.20.0040.00417.67
8.2.10.0000.00817.99
8.2.00.0050.00217.93
8.1.330.0100.01015.98
8.1.320.0100.00718.08
8.1.310.0070.01018.52
8.1.300.0030.00520.03
8.1.290.0060.00318.88
8.1.280.0150.00025.92
8.1.270.0000.00724.66
8.1.260.0070.00726.35
8.1.250.0000.00828.09
8.1.240.0060.00321.44
8.1.230.0070.00417.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00717.25
8.1.190.0050.00317.10
8.1.180.0080.00018.10
8.1.170.0040.00418.47
8.1.160.0040.00421.95
8.1.150.0050.00320.50
8.1.140.0000.00817.39
8.1.130.0000.00719.19
8.1.120.0030.00317.30
8.1.110.0000.00717.30
8.1.100.0050.00317.33
8.1.90.0040.00417.44
8.1.80.0030.00317.30
8.1.70.0020.00517.28
8.1.60.0000.00917.57
8.1.50.0040.00417.48
8.1.40.0030.00617.41
8.1.30.0060.00317.56
8.1.20.0050.00217.49
8.1.10.0040.00417.53
8.1.00.0060.00317.45
8.0.300.0070.00018.77
8.0.290.0040.00716.63
8.0.280.0030.00318.33
8.0.270.0000.00716.76
8.0.260.0000.00716.87
8.0.250.0030.00316.80
8.0.240.0030.00316.89
8.0.230.0040.00416.94
8.0.220.0030.00316.75
8.0.210.0070.00016.82
8.0.200.0030.00616.93
8.0.190.0040.00416.77
8.0.180.0000.00716.88
8.0.170.0040.00416.86
8.0.160.0060.00316.83
8.0.150.0030.00316.90
8.0.140.0070.00016.73
8.0.130.0000.00613.27
8.0.120.0080.00016.83
8.0.110.0040.00416.75
8.0.100.0030.00516.63
8.0.90.0040.00416.66
8.0.80.0120.00316.78
8.0.70.0070.00016.83
8.0.60.0020.00516.77
8.0.50.0040.00416.61
8.0.30.0120.00817.04
8.0.20.0090.00917.40
8.0.10.0000.00816.83
8.0.00.0110.00916.80
7.4.330.0000.00515.09
7.4.320.0000.00616.43
7.4.300.0030.00316.45
7.4.290.0000.00716.37
7.4.280.0030.00316.55
7.4.270.0020.00516.46
7.4.260.0030.00316.54
7.4.250.0070.00016.49
7.4.240.0030.00416.50
7.4.230.0070.00016.29
7.4.220.0070.01016.52
7.4.210.0170.00316.48
7.4.200.0030.00316.33
7.4.160.0080.00816.73
7.4.150.0100.00717.40
7.4.140.0140.00717.86
7.4.130.0100.01316.32
7.4.120.0070.01016.46
7.4.110.0030.01416.69
7.4.100.0100.01016.65
7.4.90.0100.00716.33
7.4.80.0090.01519.39
7.4.70.0130.01016.33
7.4.60.0090.00616.39
7.4.50.0040.00416.30
7.4.40.0090.01416.39
7.4.30.0030.01916.50
7.4.00.0070.00815.21
7.3.330.0000.00713.06
7.3.320.0050.00012.96
7.3.310.0030.00316.33
7.3.300.0030.00316.30
7.3.290.0080.00816.23
7.3.280.0060.01316.25
7.3.270.0130.01017.40
7.3.260.0150.00716.25
7.3.240.0060.00916.29
7.3.230.0030.01316.55
7.3.210.0140.00316.50
7.3.200.0120.00619.39
7.3.190.0090.00616.30
7.3.180.0100.00716.50
7.3.170.0090.00916.49
7.3.160.0060.01216.31
7.3.120.0030.00914.87
7.3.110.0110.00714.88
7.3.100.0100.01014.74
7.3.90.0040.00814.84
7.3.80.0030.00614.78
7.3.70.0060.00814.78
7.3.60.0030.01414.74
7.3.50.0070.00315.01
7.3.40.0030.00614.55
7.3.30.0030.01014.90
7.3.20.0040.01116.48
7.3.10.0100.00416.47
7.3.00.0070.00616.62
7.2.330.0060.01216.62
7.2.320.0070.01116.60
7.2.310.0060.01016.49
7.2.300.0050.01816.59
7.2.290.0120.00916.67
7.2.250.0000.01515.10
7.2.240.0100.01015.07
7.2.230.0000.01414.91
7.2.220.0100.00614.47
7.2.210.0060.00314.68
7.2.200.0100.00315.16
7.2.190.0040.01215.09
7.2.180.0050.00514.88
7.2.170.0060.00915.07
7.2.160.0000.01014.71
7.2.150.0090.00916.79
7.2.140.0080.00416.86
7.2.130.0060.00716.97
7.2.120.0070.00716.76
7.2.110.0040.00816.71
7.2.100.0050.00816.80
7.2.90.0080.00616.80
7.2.80.0070.00816.90
7.2.70.0070.00616.79
7.2.60.0030.01016.89
7.2.50.0070.00816.80
7.2.40.0030.00916.86
7.2.30.0070.00816.85
7.2.20.0060.00716.96
7.2.10.0020.00916.88
7.2.00.0060.00717.48
7.1.330.0090.00915.78
7.1.320.0030.01015.75
7.1.310.0070.01315.73
7.1.300.0040.00415.54
7.1.290.0080.00815.55
7.1.280.0030.01015.61
7.1.270.0030.00615.83
7.1.260.0060.00615.47
7.1.250.0050.00815.81
7.1.240.0030.00915.82
7.1.230.0060.00915.70
7.1.220.0000.01015.79
7.1.210.0070.00315.65
7.1.200.0040.00715.44
7.1.190.0060.00915.50
7.1.180.0060.00615.71
7.1.170.0060.00615.59
7.1.160.0030.00915.81
7.1.150.0070.00715.48
7.1.140.0000.01715.46
7.1.130.0050.00515.43
7.1.120.0100.00615.64
7.1.110.0000.01415.68
7.1.100.0040.00716.76
7.1.90.0090.00615.78
7.1.80.0040.01215.64
7.1.70.0030.01116.32
7.1.60.0010.01117.67
7.1.50.0050.01116.17
7.1.40.0000.01315.80
7.1.30.0030.01315.80
7.1.20.0060.00615.70
7.1.10.0080.00515.77
7.1.00.0020.04019.01
7.0.330.0040.01115.54
7.0.320.0050.00515.62
7.0.310.0000.01215.33
7.0.300.0030.00915.45
7.0.290.0030.00915.37
7.0.280.0070.00315.44
7.0.270.0030.00715.37
7.0.260.0000.00915.29
7.0.250.0130.00315.39
7.0.240.0090.00615.54
7.0.230.0100.00015.36
7.0.220.0100.00315.44
7.0.210.0070.00715.35
7.0.200.0070.00316.06
7.0.190.0030.00715.48
7.0.180.0030.00815.48
7.0.170.0120.00315.52
7.0.160.0030.01415.57
7.0.150.0080.00815.42
7.0.140.0090.00615.58
7.0.130.0030.00515.54
7.0.120.0030.00915.33
7.0.110.0060.00615.40
7.0.100.0030.00515.54
7.0.90.0040.00415.66
7.0.80.0070.00715.40
7.0.70.0000.00915.60
7.0.60.0180.03717.77
7.0.50.0090.04116.58
7.0.40.0030.03016.97
7.0.30.0100.02716.95
7.0.20.0170.02416.87
7.0.10.0100.02216.69
7.0.00.0050.03116.81
5.6.400.0100.00314.05
5.6.390.0060.00814.61
5.6.380.0030.00714.69
5.6.370.0030.00714.76
5.6.360.0080.00314.73
5.6.350.0000.01414.04
5.6.340.0060.00914.16
5.6.330.0000.01214.09
5.6.320.0060.00914.37
5.6.310.0060.00914.53
5.6.300.0060.00613.96
5.6.290.0060.00314.40
5.6.280.0030.04217.81
5.6.270.0000.01314.59
5.6.260.0100.00014.43
5.6.250.0040.01114.30
5.6.240.0060.00314.22
5.6.230.0080.00014.41
5.6.220.0000.01214.52
5.6.210.0110.03817.51
5.6.200.0080.04416.28
5.6.190.0070.02217.42
5.6.180.0270.02017.39
5.6.170.0180.02317.22
5.6.160.0050.04017.30
5.6.150.0030.04716.13
5.6.140.0070.04116.39
5.6.130.0080.02816.28
5.6.120.0020.04817.74
5.6.110.0070.04017.80
5.6.100.0020.04717.61
5.6.90.0070.03617.77
5.6.80.0100.03117.30
5.6.70.0040.01114.24
5.6.60.0070.00714.19
5.6.50.0080.00414.63
5.6.40.0000.01914.46
5.6.30.0060.00914.44
5.6.20.0040.01114.28
5.6.10.0030.01014.49
5.6.00.0140.00014.14
5.5.380.0140.00014.47
5.5.370.0000.00914.41
5.5.360.0090.00614.57
5.5.350.0050.04517.35
5.5.340.0050.02416.21
5.5.330.0030.03017.37
5.5.320.0090.03417.11
5.5.310.0200.04117.14
5.5.300.0100.03916.03
5.5.290.0070.02216.03
5.5.280.0050.02617.46
5.5.270.0080.02817.60
5.5.260.0080.04817.58
5.5.250.0050.03717.45
5.5.240.0010.04117.10
5.5.230.0040.01114.25
5.5.220.0080.00614.38
5.5.210.0080.00814.52
5.5.200.0130.00313.89
5.5.190.0070.00314.31
5.5.180.0080.00414.51
5.5.170.0060.00914.19
5.5.160.0050.00814.26
5.5.150.0030.00614.06
5.5.140.0030.01314.19
5.5.130.0120.00314.38
5.5.120.0060.00614.01
5.5.110.0070.00714.49
5.5.100.0030.00714.21
5.5.90.0040.00714.29
5.5.80.0070.01114.15
5.5.70.0100.00314.12
5.5.60.0070.00714.08
5.5.50.0090.00613.79
5.5.40.0090.00614.34
5.5.30.0080.00314.29
5.5.20.0000.01213.87
5.5.10.0090.00314.16
5.5.00.0110.00413.92
5.4.450.0250.03616.26
5.4.440.0360.03416.34
5.4.430.0490.03316.21
5.4.420.0370.03016.33
5.4.410.0270.02716.21
5.4.400.0390.03616.12
5.4.390.0380.03515.99
5.4.380.0330.03516.04
5.4.370.0350.03416.09
5.4.360.0380.03415.94
5.4.350.0350.03816.11
5.4.340.0370.03316.11
5.4.330.0030.00813.05
5.4.320.0390.03216.12
5.4.310.0320.03016.16
5.4.300.0450.02816.11
5.4.290.0420.03516.15
5.4.280.0380.04316.12
5.4.270.0470.03916.11
5.4.260.0440.03416.03
5.4.250.0300.04015.93
5.4.240.0440.02415.94
5.4.230.0430.02316.10
5.4.220.0340.03316.07
5.4.210.0280.03816.03
5.4.200.0340.03514.81
5.4.190.0350.03716.05
5.4.180.0210.03816.01
5.4.170.0260.03416.11
5.4.160.0520.02916.05
5.4.150.0310.04016.04
5.4.140.0370.03414.64
5.4.130.0400.02814.70
5.4.120.0250.03114.73
5.4.110.0100.02214.69
5.4.100.0230.03314.73
5.4.90.0400.02914.78
5.4.80.0130.03214.62
5.4.70.0080.03014.72
5.4.60.0280.03114.79
5.4.50.0290.03014.79
5.4.40.0370.02914.79
5.4.30.0190.02514.72
5.4.20.0230.03414.58
5.4.10.0320.03714.60
5.4.00.0360.02614.51
5.3.290.1030.07714.55
5.3.280.0630.05314.46
5.3.270.0730.07714.65
5.3.260.0870.07314.55
5.3.250.0800.06714.61
5.3.240.0800.04714.43
5.3.230.0600.07014.63
5.3.220.0800.05714.52
5.3.210.0870.06714.43
5.3.200.0800.06714.45
5.3.190.0870.06714.48
5.3.180.1070.05314.41
5.3.170.0800.05314.45
5.3.160.0930.05714.59
5.3.150.0830.06314.41
5.3.140.0770.08014.54
5.3.130.0600.07014.58
5.3.120.1000.05314.33
5.3.110.1030.05014.43
5.3.100.1100.06014.06
5.3.90.0700.06314.02
5.3.80.1100.05713.80
5.3.70.0900.06313.80
5.3.60.0700.05714.02
5.3.50.0770.06313.77
5.3.40.0800.06013.73
5.3.30.0870.06013.93
5.3.20.1000.06313.56
5.3.10.0770.06713.60
5.3.00.0870.05713.42
5.2.170.0770.04011.19
5.2.160.0700.05310.98
5.2.150.0630.04710.93
5.2.140.0700.04710.97
5.2.130.0800.05311.18
5.2.120.0630.03711.06
5.2.110.0630.03711.04
5.2.100.0530.05711.04
5.2.90.0500.05011.04
5.2.80.0470.05011.03
5.2.70.0470.05011.03
5.2.60.0600.05011.09
5.2.50.0630.05711.11
5.2.40.0500.04310.84
5.2.30.0570.05710.83
5.2.20.0570.04010.86
5.2.10.0400.05710.83
5.2.00.0470.04310.61
5.1.60.0470.03710.03
5.1.50.0400.0339.83
5.1.40.0430.03310.01
5.1.30.0570.05010.23
5.1.20.0470.05310.26
5.1.10.0470.03010.04
5.1.00.0530.03710.00
5.0.50.0230.0278.45
5.0.40.0300.0378.43
5.0.30.0330.0438.15
5.0.20.0430.0238.01
5.0.10.0200.0338.06
5.0.00.0370.0438.21
4.4.90.0270.0235.77
4.4.80.0330.0275.91
4.4.70.0370.0175.83
4.4.60.0430.0175.89
4.4.50.0270.0235.73
4.4.40.0330.0475.80
4.4.30.0330.0305.89
4.4.20.0230.0235.91
4.4.10.0300.0205.83
4.4.00.0330.0375.79
4.3.110.0200.0235.73
4.3.100.0170.0275.69
4.3.90.0230.0275.75
4.3.80.0330.0475.77
4.3.70.0300.0205.83
4.3.60.0300.0205.66
4.3.50.0170.0275.63
4.3.40.0230.0305.61
4.3.30.0100.0274.41
4.3.20.0100.0274.49
4.3.10.0170.0204.43
4.3.00.0170.0177.82

preferences:
32.98 ms | 403 KiB | 5 Q