3v4l.org

run code in 300+ PHP versions simultaneously
<?php // A unit testing framework in a tweet. https://gist.github.com/mathiasverraes/9046427 function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);} function consistsOfTheSameValues(array $a, array $b) { sort($a); sort($b); return $a == $b; } it("consistsOfTheSameValues([1], [1])", consistsOfTheSameValues([1], [1]) === true ); it("consistsOfTheSameValues([1, 1], [1, 1])", consistsOfTheSameValues([1, 1], [1, 1]) === true ); it("consistsOfTheSameValues(['1', 1], ['1', 1])", consistsOfTheSameValues(['1', 1], ['1', 1]) === true ); it("consistsOfTheSameValues(['1', 1], [1, '1'])", consistsOfTheSameValues(['1', 1], [1, '1']) === true ); it("consistsOfTheSameValues([1, '1'], ['1', 1])", consistsOfTheSameValues([1, '1'], ['1', 1]) === true ); it("consistsOfTheSameValues([1, '1'], [1, '1'])", consistsOfTheSameValues([1, '1'], [1, '1']) === true ); it("consistsOfTheSameValues(['x' => 1], ['x' => 1])", consistsOfTheSameValues(['x' => 1], ['x' => 1]) === true ); it("consistsOfTheSameValues(['x' => 1], ['y' => 1])", consistsOfTheSameValues(['x' => 1], ['y' => 1]) === true ); it("consistsOfTheSameValues(['y' => 1], ['x' => 1])", consistsOfTheSameValues(['y' => 1], ['x' => 1]) === true ); it("consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 1])", consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 1]) === true ); it("consistsOfTheSameValues(['y' => 1, 'x' => 1], ['x' => 1, 'y' => 1])", consistsOfTheSameValues(['y' => 1, 'x' => 1], ['x' => 1, 'y' => 1]) === true ); it("consistsOfTheSameValues(['x' => 1, 'y' => 1], ['y' => 1, 'x' => 1])", consistsOfTheSameValues(['x' => 1, 'y' => 1], ['y' => 1, 'x' => 1]) === true ); it("consistsOfTheSameValues(['y' => 1, 'x' => 1], ['y' => 1, 'x' => 1])", consistsOfTheSameValues(['y' => 1, 'x' => 1], ['y' => 1, 'x' => 1]) === true ); it("consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 2])", consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 2]) === true ); it("does not consistsOfTheSameValues([1], [2])", consistsOfTheSameValues([1], [2]) === false ); it("does not consistsOfTheSameValues(['1'], [1])", consistsOfTheSameValues(['1'], [1]) === false ); it("does not consistsOfTheSameValues([1], ['1'])", consistsOfTheSameValues([1], ['1']) === false ); it("does not consistsOfTheSameValues([1], [1, 1])", consistsOfTheSameValues([1], [1, 1]) === false ); it("does not consistsOfTheSameValues([1, 1], [1])", consistsOfTheSameValues([1, 1], [1]) === false ); it("does not consistsOfTheSameValues(['1', 1], [1, 1])", consistsOfTheSameValues(['1', 1], [1, 1]) === false ); it("does not consistsOfTheSameValues([1, '1'], [1, 1])", consistsOfTheSameValues([1, '1'], [1, 1]) === false ); it("does not consistsOfTheSameValues([1, 1], ['1', 1])", consistsOfTheSameValues([1, 1], ['1', 1]) === false ); it("does not consistsOfTheSameValues([1, 1], [1, '1'])", consistsOfTheSameValues([1, 1], [1, '1']) === false ); it("does not consistsOfTheSameValues(['1', '1'], [1, 1])", consistsOfTheSameValues(['1', '1'], [1, 1]) === false ); it("does not consistsOfTheSameValues(['1', '1'], ['1', 1])", consistsOfTheSameValues(['1', '1'], ['1', 1]) === false ); it("does not consistsOfTheSameValues(['1', '1'], [1, '1'])", consistsOfTheSameValues(['1', '1'], [1, '1']) === false ); it("does not consistsOfTheSameValues([1, 1], ['1', '1'])", consistsOfTheSameValues([1, 1], ['1', '1']) === false ); it("does not consistsOfTheSameValues(['1', 1], ['1', '1'])", consistsOfTheSameValues(['1', 1], ['1', '1']) === false ); it("does not consistsOfTheSameValues([1, '1'], ['1', '1'])", consistsOfTheSameValues([1, '1'], ['1', '1']) === false ); it("does not consistsOfTheSameValues(['x' => 1], ['x' => 2])", consistsOfTheSameValues(['x' => 1], ['x' => 2]) === false ); it("does not consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 2])", consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 2]) === false ); it("does not consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 2, 'y' => 1])", consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 2, 'y' => 1]) === false ); it("does not consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 1])", consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 1]) === false );

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.0110.00820.45
8.4.110.0070.01118.29
8.4.100.0040.00418.15
8.4.90.0100.01020.74
8.4.80.0140.00619.53
8.4.70.0150.00618.23
8.4.60.0140.00718.85
8.4.50.0140.00818.84
8.4.40.0090.01019.35
8.4.30.0090.00918.14
8.4.20.0130.00719.40
8.4.10.0070.00317.86
8.3.250.0130.00617.29
8.3.240.0100.01016.80
8.3.230.0130.00716.79
8.3.220.0100.00719.08
8.3.210.0120.00618.44
8.3.200.0050.00416.64
8.3.190.0100.00917.42
8.3.180.0120.00716.70
8.3.170.0090.00918.74
8.3.160.0050.00318.70
8.3.150.0160.00616.75
8.3.140.0060.00318.96
8.3.130.0030.00518.71
8.3.120.0060.00320.60
8.3.110.0030.00620.94
8.3.100.0090.00024.06
8.3.90.0110.00426.77
8.3.80.0060.00318.68
8.3.70.0090.00618.30
8.3.60.0190.00316.75
8.3.50.0120.00517.43
8.3.40.0070.00718.83
8.3.30.0080.00818.63
8.3.20.0000.00821.86
8.3.10.0000.00823.70
8.3.00.0050.00319.67
8.2.290.0120.00816.56
8.2.280.0140.00520.09
8.2.270.0100.00017.29
8.2.260.0040.00416.57
8.2.250.0080.00816.83
8.2.240.0060.00317.21
8.2.230.0090.00022.58
8.2.220.0070.00437.54
8.2.210.0130.00626.77
8.2.200.0080.00316.88
8.2.190.0100.00616.58
8.2.180.0040.01116.59
8.2.170.0040.01122.96
8.2.160.0100.00720.69
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.79
8.2.110.0050.00521.05
8.2.100.0060.00618.34
8.2.90.0040.00418.28
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0050.00318.16
8.2.50.0080.00018.10
8.2.40.0030.00520.49
8.2.30.0040.00419.43
8.2.20.0040.00418.23
8.2.10.0000.00818.21
8.2.00.0000.00718.18
8.1.330.0160.00516.14
8.1.320.0120.00916.32
8.1.310.0080.00018.41
8.1.300.0130.00720.34
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0030.00523.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0120.00017.48
8.1.230.0000.01121.15
8.1.220.0040.00417.77
8.1.210.0000.00818.89
8.1.200.0070.00317.48
8.1.190.0030.00617.35
8.1.180.0040.00418.94
8.1.170.0030.00518.77
8.1.160.0080.00019.00
8.1.150.0000.00720.51
8.1.140.0050.00217.89
8.1.130.0070.00019.14
8.1.120.0000.00717.57
8.1.110.0000.00717.60
8.1.100.0000.00717.52
8.1.90.0070.00017.50
8.1.80.0050.00217.51
8.1.70.0030.00317.48
8.1.60.0050.00517.57
8.1.50.0030.00617.51
8.1.40.0040.00417.58
8.1.30.0060.00317.77
8.1.20.0030.00617.80
8.1.10.0000.00817.66
8.1.00.0040.00417.46
8.0.300.0000.00819.90
8.0.290.0040.00416.75
8.0.280.0070.00018.52
8.0.270.0040.00417.25
8.0.260.0050.00316.96
8.0.250.0000.00717.09
8.0.240.0040.00417.03
8.0.230.0030.00316.99
8.0.220.0000.00917.01
8.0.210.0050.00316.98
8.0.200.0000.00716.92
8.0.190.0040.00416.93
8.0.180.0000.00717.00
8.0.170.0060.00316.92
8.0.160.0000.00716.91
8.0.150.0050.00316.79
8.0.140.0040.00416.97
8.0.130.0130.00215.12
8.0.120.0100.00616.93
8.0.110.0090.00716.97
8.0.100.0100.00616.98
8.0.90.0150.00017.03
8.0.80.0150.00716.84
8.0.70.0130.00316.86
8.0.60.0130.00316.97
8.0.50.0130.00416.89
8.0.30.0130.00617.15
8.0.20.0110.01217.36
8.0.10.0070.00817.10
8.0.00.0140.00616.93
7.4.330.0000.00615.55
7.4.320.0000.00616.63
7.4.300.0060.00016.74
7.4.290.0000.00816.65
7.4.280.0000.00716.68
7.4.270.0070.00016.59
7.4.260.0120.00316.71
7.4.250.0130.00216.59
7.4.240.0080.00616.64
7.4.230.0080.00616.54
7.4.220.0090.00416.64
7.4.210.0070.00916.54
7.4.200.0060.00716.68
7.4.190.0130.00516.75
7.4.180.0130.00616.77
7.4.160.0120.00616.58
7.4.150.0180.00516.97
7.4.140.0110.00817.59
7.4.130.0100.00916.62
7.4.120.0130.00716.62
7.4.110.0080.00916.73
7.4.100.0120.00716.59
7.4.90.0160.00216.54
7.4.80.0130.00817.92
7.4.70.0110.00716.59
7.4.60.0070.01016.62
7.4.50.0140.00316.41
7.4.40.0150.00316.45
7.4.30.0110.00716.54
7.4.20.0150.00416.49
7.4.10.0110.00816.34
7.4.00.0110.00715.74
7.3.330.0090.00314.78
7.3.320.0080.00414.85
7.3.310.0090.00416.35
7.3.300.0080.00516.38
7.3.290.0100.00816.53
7.3.280.0100.00716.49
7.3.270.0100.01016.99
7.3.260.0140.00716.66
7.3.250.0200.00016.54
7.3.240.0120.00716.63
7.3.230.0070.01016.45
7.3.220.0150.00316.47
7.3.210.0090.00416.52
7.3.200.0030.01116.40
7.3.190.0110.00716.59
7.3.180.0150.00316.61
7.3.170.0100.01016.45
7.3.160.0130.00516.39
7.3.150.0190.00016.45
7.3.140.0120.00416.23
7.3.130.0200.00016.29
7.3.120.0110.00715.73
7.3.110.0080.01115.53
7.3.100.0120.00715.79
7.3.90.0130.00315.87
7.3.80.0120.00615.69
7.3.70.0100.00815.57
7.3.60.0090.00815.70
7.3.50.0110.00815.67
7.3.40.0130.00515.82
7.3.30.0120.00615.80
7.3.20.0110.00417.35
7.3.10.0120.00717.50
7.3.00.0100.00617.43
7.2.340.0200.00316.44
7.2.330.0130.00716.81
7.2.320.0150.00816.59
7.2.310.0080.01216.75
7.2.300.0140.00616.59
7.2.290.0130.00916.64
7.2.280.0190.00316.62
7.2.270.0160.00616.50
7.2.260.0140.01016.58
7.2.250.0220.00416.57
7.2.240.0120.00715.86
7.2.230.0140.00215.68
7.2.220.0100.00915.86
7.2.210.0110.00615.98
7.2.200.0170.00315.95
7.2.190.0120.00615.81
7.2.180.0100.00615.72
7.2.170.0130.00615.91
7.2.160.0130.00915.98
7.2.150.0100.01017.70
7.2.140.0050.01217.74
7.2.130.0120.00817.60
7.2.120.0140.00717.71
7.2.110.0100.00717.70
7.2.100.0120.00917.54
7.2.90.0120.00617.75
7.2.80.0130.00517.59
7.2.70.0140.00517.63
7.2.60.0090.00617.39
7.2.50.0130.00717.63
7.2.40.0110.00917.81
7.2.30.0090.00917.59
7.2.20.0100.01119.03
7.2.10.0090.01319.00
7.2.00.0100.00918.96
7.1.330.0100.00916.53
7.1.320.0160.00516.62
7.1.310.0130.00416.43
7.1.300.0120.00516.59
7.1.290.0120.00516.62
7.1.280.0120.01016.37
7.1.270.0080.00716.54
7.1.260.0090.00916.53
7.1.250.0090.01016.49
7.1.240.0160.00717.33
7.1.230.0180.00417.36
7.1.220.0170.00317.41
7.1.210.0160.00517.17
7.1.200.0130.00416.41
7.1.190.0180.00617.36
7.1.180.0080.01417.14
7.1.170.0140.00717.30
7.1.160.0170.00717.13
7.1.150.0200.00417.29
7.1.140.0110.01118.27
7.1.130.0120.01018.26
7.1.120.0110.00918.44
7.1.110.0120.00717.93
7.1.100.0100.01217.83
7.1.90.0090.00917.88
7.1.80.0100.01017.93
7.1.70.0090.00917.23
7.1.60.0220.01330.63
7.1.50.0250.01330.46
7.1.40.0210.01430.12
7.1.30.0240.01330.25
7.1.20.0250.01330.17
7.1.10.0090.01116.67
7.1.00.0100.01116.80
7.0.330.0150.00817.06
7.0.320.0150.00716.88
7.0.310.0140.00416.84
7.0.300.0080.00816.89
7.0.290.0070.01116.87
7.0.280.0110.00516.83
7.0.270.0130.00716.88
7.0.260.0140.00317.10
7.0.250.0150.00317.07
7.0.240.0130.00417.11
7.0.230.0180.00017.18
7.0.220.0140.00417.21
7.0.210.0110.00617.07
7.0.200.0120.00617.07
7.0.190.0090.00917.13
7.0.180.0140.00416.85
7.0.170.0150.00317.20
7.0.160.0130.00417.09
7.0.150.0150.00416.84
7.0.140.0130.00616.79
7.0.130.0150.00317.16
7.0.120.0170.00017.13
7.0.110.0160.00016.84
7.0.100.0140.00517.00
7.0.90.0160.00317.11
7.0.80.0140.00316.92
7.0.70.0190.00316.98
7.0.60.0100.00717.06
7.0.50.0120.00417.02
7.0.40.0140.00317.01
7.0.30.0140.00316.95
7.0.20.0130.00317.09
7.0.10.0120.00417.05
7.0.00.0130.00316.80
5.6.400.0110.00015.82
5.6.390.0080.00816.02
5.6.380.0120.00616.03
5.6.370.0170.00015.88
5.6.360.0110.00515.86
5.6.350.0120.00415.80
5.6.340.0100.00715.96
5.6.330.0110.00515.96
5.6.320.0170.00016.04
5.6.310.0090.00916.09
5.6.300.0130.00315.87
5.6.290.0130.00415.85
5.6.280.0100.00615.84
5.6.270.0160.00316.05
5.6.260.0180.00015.96
5.6.250.0080.00815.81
5.6.240.0160.00016.01
5.6.230.0130.00315.96
5.6.220.0120.00615.99
5.6.210.0170.00016.06
5.6.200.0170.00016.11
5.6.190.0100.00716.17
5.6.180.0140.00416.03
5.6.170.0130.00316.10
5.6.160.0170.00016.19
5.6.150.0110.00616.14
5.6.140.0080.00815.98
5.6.130.0130.00316.02
5.6.120.0110.00515.92
5.6.110.0170.00015.79
5.6.100.0130.00316.04
5.6.90.0080.00815.83
5.6.80.0050.01115.99
5.6.70.0090.00615.82
5.6.60.0080.00815.95
5.6.50.0130.00315.76
5.6.40.0130.00316.04
5.6.30.0160.00015.82
5.6.20.0120.00415.86
5.6.10.0130.00315.75
5.6.00.0110.00515.98

preferences:
29.64 ms | 403 KiB | 5 Q