3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { return array(1,2,3,4); } } $tmp = Foo::bar(); var_dump(array_pop($tmp)); var_dump(array_pop(Foo::bar())); // Works with HHVM, PHP: Strict Standards: Only variables should be passed by reference in /in/7aWJe on line 10 var_dump(array_splice(Foo::bar(),2)); // Works with HHVM, PHP: Strict Standards: Only variables should be passed by reference in /in/7aWJe on line 11 //var_dump(array_splice(array(1,2,3,4),2)); // Works with HHVM, PHP: Fatal error: Only variables can be passed by reference in /in/Z57M3 on line 12

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.2.10.0000.00817.87
8.2.00.0030.00717.62
8.1.140.0040.00417.48
8.1.130.0040.00417.86
8.1.120.0030.00317.29
8.1.110.0040.00417.43
8.1.100.0070.00017.36
8.1.90.0040.00417.28
8.1.80.0000.00817.42
8.1.70.0040.00417.33
8.1.60.0000.00917.60
8.1.50.0080.00017.49
8.1.40.0050.00317.54
8.1.30.0060.00317.67
8.1.20.0000.00817.52
8.1.10.0000.00717.60
8.1.00.0000.00717.43
8.0.260.0030.00317.20
8.0.250.0070.00016.87
8.0.240.0030.00316.96
8.0.230.0000.00716.92
8.0.220.0030.00316.91
8.0.210.0030.00316.79
8.0.200.0030.00316.87
8.0.190.0050.00216.95
8.0.180.0000.00716.80
8.0.170.0080.00016.92
8.0.160.0030.00416.91
8.0.150.0000.00716.75
8.0.140.0040.00416.80
8.0.130.0030.00313.34
8.0.120.0040.00416.84
8.0.110.0070.00016.86
8.0.100.0040.00416.75
8.0.90.0080.00017.00
8.0.80.0060.00916.93
8.0.70.0000.00816.71
8.0.60.0070.00016.76
8.0.50.0030.00516.77
8.0.30.0150.00817.02
8.0.20.0060.01517.40
8.0.10.0070.00016.79
8.0.00.0080.01116.60
7.4.330.0000.00515.02
7.4.320.0030.00316.54
7.4.300.0060.00016.48
7.4.290.0070.00016.43
7.4.280.0040.00416.57
7.4.270.0000.00716.52
7.4.260.0000.00716.45
7.4.250.0080.00016.61
7.4.240.0030.00416.54
7.4.230.0040.00416.34
7.4.220.0200.00016.61
7.4.210.0100.01016.48
7.4.200.0000.00716.68
7.4.160.0090.01216.50
7.4.150.0120.00617.40
7.4.140.0120.00517.86
7.4.130.0100.00816.65
7.4.120.0140.00316.48
7.4.110.0080.00816.47
7.4.100.0120.00616.48
7.4.90.0130.00316.36
7.4.80.0090.00916.39
7.4.70.0060.01216.52
7.4.60.0030.01716.42
7.4.50.0030.00516.48
7.4.40.0040.01216.52
7.4.30.0100.00716.55
7.4.00.0080.00814.92
7.3.330.0000.00613.32
7.3.320.0000.00613.30
7.3.310.0020.00516.15
7.3.300.0030.00316.25
7.3.290.0030.00316.34
7.3.280.0080.01016.23
7.3.270.0070.01017.40
7.3.260.0120.00416.38
7.3.250.0070.01016.32
7.3.240.0100.00616.41
7.3.230.0140.00716.39
7.3.210.0170.00016.52
7.3.200.0150.00319.39
7.3.190.0120.00416.35
7.3.180.0070.01416.40
7.3.170.0060.00916.27
7.3.160.0130.00316.18
7.3.120.0070.01314.69
7.3.110.0060.01314.73
7.3.100.0040.01414.70
7.3.90.0100.00314.84
7.3.80.0100.00014.79
7.3.70.0070.00314.88
7.3.60.0070.01014.86
7.3.50.0070.00714.66
7.3.40.0030.00614.50
7.3.30.0080.00414.83
7.3.20.0070.01016.71
7.3.10.0060.00616.32
7.3.00.0030.00916.56
7.2.330.0120.00616.66
7.2.320.0130.00416.22
7.2.310.0150.00316.75
7.2.300.0060.01516.67
7.2.290.0040.01816.66
7.2.250.0070.01315.05
7.2.240.0030.01214.92
7.2.230.0030.01014.84
7.2.220.0100.00315.25
7.2.210.0040.01415.06
7.2.200.0080.00414.98
7.2.190.0070.00715.12
7.2.180.0000.01015.02
7.2.170.0040.00815.02
7.2.160.0100.00714.84
7.2.150.0070.00716.66
7.2.140.0070.00716.71
7.2.130.0060.00916.63
7.2.120.0100.00316.71
7.2.110.0050.01216.72
7.2.100.0070.00916.72
7.2.90.0000.01116.64
7.2.80.0060.01116.78
7.2.70.0030.00917.00
7.2.60.0030.00816.61
7.2.50.0090.00516.69
7.2.40.0100.00516.73
7.2.30.0070.00716.70
7.2.20.0090.00616.83
7.2.10.0040.01016.74
7.2.00.0020.01017.50
7.1.330.0110.00715.85
7.1.320.0100.00715.75
7.1.310.0000.00815.48
7.1.300.0030.00915.71
7.1.290.0070.00715.78
7.1.280.0030.01315.80
7.1.270.0100.00315.74
7.1.260.0100.00315.75
7.1.250.0040.00915.60
7.1.240.0030.00915.53
7.1.230.0030.01015.59
7.1.220.0060.00315.55
7.1.210.0070.01015.53
7.1.200.0070.00615.69
7.1.190.0040.01215.54
7.1.180.0030.01015.71
7.1.170.0000.01515.58
7.1.160.0070.00715.48
7.1.150.0090.00315.71
7.1.140.0030.01115.52
7.1.130.0130.00315.78
7.1.120.0100.00715.80
7.1.110.0040.01415.40
7.1.100.0040.00916.68
7.1.90.0000.01415.69
7.1.80.0090.00615.75
7.1.70.0040.00616.36
7.1.60.0100.00617.53
7.1.50.0030.01516.09
7.1.40.0040.00715.70
7.1.30.0000.01515.75
7.1.20.0080.00615.71
7.1.10.0160.00015.77
7.1.00.0070.04018.93
7.0.330.0070.00715.29
7.0.320.0060.00615.36
7.0.310.0090.00615.43
7.0.300.0000.01415.12
7.0.290.0030.00715.29
7.0.280.0060.00915.36
7.0.270.0000.01315.08
7.0.260.0080.00815.42
7.0.250.0030.01315.50
7.0.240.0070.01015.40
7.0.230.0030.01015.13
7.0.220.0040.00415.41
7.0.210.0080.00615.35
7.0.200.0260.00315.00
7.0.190.0060.00915.17
7.0.180.0070.00315.13
7.0.170.0030.00915.52
7.0.160.0000.01615.39
7.0.150.0040.00415.32
7.0.140.0090.03218.61
7.0.130.0000.00915.18
7.0.120.0080.00315.40
7.0.110.0030.01415.23
7.0.100.0060.02017.76
7.0.90.0070.02217.62
7.0.80.0050.02317.65
7.0.70.0070.01917.46
7.0.60.0050.02317.66
7.0.50.0050.02317.84
7.0.40.0090.02016.75
7.0.30.0100.04216.69
7.0.20.0070.04616.69
7.0.10.0050.04816.74
7.0.00.0110.04216.76
5.6.400.0040.01114.35
5.6.390.0040.01113.93
5.6.380.0070.01014.29
5.6.370.0000.01113.92
5.6.360.0030.01314.47
5.6.350.0000.01514.36
5.6.340.0090.00613.82
5.6.330.0080.00313.86
5.6.320.0000.01314.26
5.6.310.0060.01014.50
5.6.300.0070.00314.08
5.6.290.0110.00314.06
5.6.280.0030.04017.78
5.6.270.0110.00314.23
5.6.260.0040.00414.40
5.6.250.0050.02017.42
5.6.240.0020.02617.41
5.6.230.0050.02517.52
5.6.220.0050.02517.39
5.6.210.0010.02617.38
5.6.200.0040.02717.60
5.6.190.0050.02617.60
5.6.180.0000.02817.68
5.6.170.0060.04517.77
5.6.160.0080.04517.64
5.6.150.0070.04017.51
5.6.140.0150.03517.54
5.6.130.0020.05217.68
5.6.120.0050.02817.53
5.6.110.0100.03817.70
5.6.100.0040.04317.49
5.6.90.0050.05017.61
5.6.80.0040.04617.34
5.6.70.0100.03817.21
5.6.60.0090.03717.33
5.6.50.0020.03017.38
5.6.40.0080.04317.21
5.6.30.0080.02517.29
5.6.20.0080.03717.41
5.6.10.0080.04017.43
5.6.00.0050.04117.32
5.5.380.0070.02517.25
5.5.370.0030.02117.23
5.5.360.0050.02417.32
5.5.350.0020.02717.23
5.5.340.0050.02217.46
5.5.330.0030.02317.47
5.5.320.0030.04517.67
5.5.310.0080.04017.51
5.5.300.0050.03817.48
5.5.290.0060.04617.52
5.5.280.0120.03517.67
5.5.270.0030.03317.64
5.5.260.0140.03517.65
5.5.250.0110.04017.52
5.5.240.0030.03317.00
5.5.230.0030.04917.11
5.5.220.0130.03517.19
5.5.210.0050.04717.28
5.5.200.0080.04217.22
5.5.190.0050.04517.24
5.5.180.0130.04217.11
5.5.170.0000.00914.26
5.5.160.0050.04317.29
5.5.150.0070.04217.11
5.5.140.0080.03017.09
5.5.130.0040.04517.16
5.5.120.0070.03017.23
5.5.110.0070.04417.19
5.5.100.0050.02417.14
5.5.90.0020.04817.23
5.5.80.0090.03317.17
5.5.70.0050.03317.11
5.5.60.0070.04016.98
5.5.50.0080.04117.04
5.5.40.0060.03617.15
5.5.30.0080.03717.02
5.5.20.0080.04117.14
5.5.10.0040.04217.04
5.5.00.0030.04717.18
5.4.450.0050.04515.41
5.4.440.0070.02015.47
5.4.430.0050.04215.42
5.4.420.0070.04115.30
5.4.410.0030.03515.24
5.4.400.0050.04215.26
5.4.390.0030.02515.13
5.4.380.0080.03915.12
5.4.370.0130.03515.13
5.4.360.0050.03715.15
5.4.350.0090.03215.21
5.4.340.0050.04115.29
5.4.330.0000.00611.39
5.4.320.0100.03015.27
5.4.310.0060.03315.21
5.4.300.0100.03715.15
5.4.290.0120.03715.26
5.4.280.0080.04315.30
5.4.270.0020.04015.26
5.4.260.0070.03715.29
5.4.250.0080.03315.27
5.4.240.0090.02115.17
5.4.230.0110.03515.14
5.4.220.0030.04015.28
5.4.210.0110.03715.14
5.4.200.0060.03815.29
5.4.190.0030.02715.29
5.4.180.0090.01915.25
5.4.170.0030.02415.26
5.4.160.0070.03315.24
5.4.150.0050.04015.26
5.4.140.0080.03113.87
5.4.130.0070.03313.88
5.4.120.0050.03613.88
5.4.110.0050.03713.94
5.4.100.0020.04313.93
5.4.90.0050.03613.86
5.4.80.0070.03813.82
5.4.70.0070.03713.82
5.4.60.0070.03313.88
5.4.50.0050.03313.85
5.4.40.0030.03613.89
5.4.30.0050.03713.94
5.4.20.0060.03413.86
5.4.10.0050.03313.82
5.4.00.0070.03713.55
5.3.290.0100.07714.70
5.3.280.0070.07014.52
5.3.270.0000.04714.54
5.3.260.0030.08314.70
5.3.250.0100.07314.71
5.3.240.0130.05714.75
5.3.230.0070.06714.69
5.3.220.0070.08314.56
5.3.210.0170.06714.71
5.3.200.0070.07314.49
5.3.190.0130.08714.63
5.3.180.0070.07014.56
5.3.170.0030.04314.66
5.3.160.0130.04314.54
5.3.150.0030.06714.63
5.3.140.0100.06714.70
5.3.130.0030.04714.48
5.3.120.0070.05314.56
5.3.110.0030.05714.50
5.3.100.0070.07014.01
5.3.90.0170.06313.95
5.3.80.0100.07714.08
5.3.70.0070.07313.95
5.3.60.0100.07014.11
5.3.50.0030.07713.87
5.3.40.0130.07013.95
5.3.30.0070.07313.97
5.3.20.0100.07013.66
5.3.10.0100.06313.66
5.3.00.0100.06713.71
5.2.170.0070.05712.59
5.2.160.0130.05012.59
5.2.150.0100.05712.59
5.2.140.0030.06312.59
5.2.130.0100.06312.59
5.2.120.0030.05712.59
5.2.110.0000.06312.59
5.2.100.0030.06012.59
5.2.90.0000.04312.59
5.2.80.0070.04712.59
5.2.70.0070.05012.59
5.2.60.0030.06312.59
5.2.50.0170.05312.59
5.2.40.0030.05012.59
5.2.30.0070.05012.59
5.2.20.0000.05312.59
5.2.10.0100.05712.59
5.2.00.0030.06012.59
5.1.60.0000.04712.59
5.1.50.0000.03712.59
5.1.40.0100.04312.59
5.1.30.0070.05712.59
5.1.20.0030.06012.59
5.1.10.0100.04712.59
5.1.00.0070.04312.59
5.0.50.0030.04312.59
5.0.40.0100.03312.59
5.0.30.0030.05012.59
5.0.20.0030.04312.59
5.0.10.0030.04312.59
5.0.00.0000.04712.59
4.4.90.0000.02012.59
4.4.80.0000.02712.59
4.4.70.0000.03012.59
4.4.60.0070.03012.59
4.4.50.0030.03712.59
4.4.40.0070.05012.59
4.4.30.0000.04012.59
4.4.20.0070.03312.59
4.4.10.0070.02712.59
4.4.00.0030.05312.59
4.3.110.0030.03312.59
4.3.100.0000.02712.59
4.3.90.0070.03012.59
4.3.80.0030.04712.59
4.3.70.0000.02712.59
4.3.60.0030.03712.59
4.3.50.0000.03312.59
4.3.40.0000.04712.59
4.3.30.0070.03012.59
4.3.20.0000.03312.59
4.3.10.0030.03712.59
4.3.00.0030.03712.59

preferences:
13.97 ms | 403 KiB | 5 Q