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.0070.01322.48
8.4.110.0150.00622.21
8.4.100.0110.01118.73
8.4.90.0090.01118.91
8.4.80.0090.01019.24
8.4.70.0120.00919.25
8.4.60.0120.00820.64
8.4.50.0100.01218.67
8.4.40.0100.01019.32
8.4.30.0130.00717.62
8.4.20.0170.00319.72
8.4.10.0110.00018.01
8.3.250.0110.00819.33
8.3.240.0100.01117.14
8.3.230.0100.01016.59
8.3.220.0120.00818.99
8.3.210.0110.00916.90
8.3.200.0050.00416.80
8.3.190.0090.00917.18
8.3.180.0090.00916.84
8.3.170.0190.00020.53
8.3.160.0120.00018.43
8.3.150.0100.01018.90
8.3.140.0120.00617.38
8.3.130.0040.00418.25
8.3.120.0030.01320.76
8.3.110.0090.00018.41
8.3.100.0070.00716.72
8.3.90.0030.00526.77
8.3.80.0040.00717.97
8.3.70.0060.00918.43
8.3.60.0110.01116.63
8.3.50.0100.00617.47
8.3.40.0160.00618.84
8.3.30.0080.00818.89
8.3.20.0000.00821.85
8.3.10.0000.00723.65
8.3.00.0050.00319.56
8.2.290.0120.00620.56
8.2.280.0100.00518.57
8.2.270.0000.01017.57
8.2.260.0060.00316.89
8.2.250.0120.00618.29
8.2.240.0090.00018.61
8.2.230.0050.00320.94
8.2.220.0060.00324.06
8.2.210.0070.01326.77
8.2.200.0090.00316.50
8.2.190.0070.01416.88
8.2.180.0090.00916.58
8.2.170.0160.00022.96
8.2.160.0110.00420.83
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00420.65
8.2.120.0070.00026.35
8.2.110.0030.00719.46
8.2.100.0120.00017.72
8.2.90.0040.00420.77
8.2.80.0000.00920.30
8.2.70.0030.00517.92
8.2.60.0040.00418.15
8.2.50.0030.00618.27
8.2.40.0030.00520.54
8.2.30.0000.00819.38
8.2.20.0040.00418.12
8.2.10.0030.00518.16
8.2.00.0000.00718.27
8.1.330.0100.01022.30
8.1.320.0100.00916.36
8.1.310.0040.00418.78
8.1.300.0110.00420.11
8.1.290.0000.00930.84
8.1.280.0110.00725.92
8.1.270.0080.00022.18
8.1.260.0050.00326.35
8.1.250.0090.00028.09
8.1.240.0060.00323.84
8.1.230.0060.00621.10
8.1.220.0000.00817.79
8.1.210.0040.00419.04
8.1.200.0000.00817.48
8.1.190.0000.00817.41
8.1.180.0000.00818.10
8.1.170.0000.00818.69
8.1.160.0060.00319.02
8.1.150.0000.00720.32
8.1.140.0000.00717.83
8.1.130.0070.00019.10
8.1.120.0040.00417.56
8.1.110.0040.00417.50
8.1.100.0080.00017.60
8.1.90.0000.00817.49
8.1.80.0070.00017.47
8.1.70.0030.00617.50
8.1.60.0030.00617.67
8.1.50.0040.00817.55
8.1.40.0000.00817.69
8.1.30.0040.00417.75
8.1.20.0050.00217.78
8.1.10.0030.00517.63
8.1.00.0000.00817.44
8.0.300.0040.00420.22
8.0.290.0070.00016.63
8.0.280.0000.00718.52
8.0.270.0000.00717.34
8.0.260.0000.00716.80
8.0.250.0030.00317.04
8.0.240.0040.00417.11
8.0.230.0070.00017.08
8.0.220.0070.00417.01
8.0.210.0070.00017.00
8.0.200.0000.00616.89
8.0.190.0000.00717.07
8.0.180.0070.00017.07
8.0.170.0000.01016.99
8.0.160.0040.00416.93
8.0.150.0030.00516.77
8.0.140.0000.00916.93
8.0.130.0090.00415.12
8.0.120.0100.00316.82
8.0.110.0080.00516.97
8.0.100.0040.00916.87
8.0.90.0050.00816.91
8.0.80.0100.00817.01
8.0.70.0110.00316.91
8.0.60.0100.00416.79
8.0.50.0090.00516.84
8.0.30.0120.00617.20
8.0.20.0110.00917.34
8.0.10.0110.00317.02
8.0.00.0090.00916.83
7.4.330.0030.00315.55
7.4.320.0030.00316.63
7.4.300.0040.00416.71
7.4.290.0050.00316.69
7.4.280.0030.00516.75
7.4.270.0000.00816.74
7.4.260.0100.00516.61
7.4.250.0080.00616.73
7.4.240.0080.00716.65
7.4.230.0080.00616.62
7.4.220.0090.00416.59
7.4.210.0130.00516.64
7.4.200.0050.00816.61
7.4.190.0120.00616.71
7.4.180.0130.00416.79
7.4.160.0100.00916.70
7.4.150.0080.01117.06
7.4.140.0110.00817.57
7.4.130.0130.00516.63
7.4.120.0130.00816.69
7.4.110.0130.00616.51
7.4.100.0110.01016.52
7.4.90.0120.00916.58
7.4.80.0170.00917.50
7.4.70.0120.00616.60
7.4.60.0130.00516.59
7.4.50.0090.00816.65
7.4.40.0120.00616.60
7.4.30.0110.00816.63
7.4.20.0120.00516.59
7.4.10.0110.00816.06
7.4.00.0070.01015.81
7.3.330.0090.00214.87
7.3.320.0090.00314.84
7.3.310.0070.00616.32
7.3.300.0090.00416.38
7.3.290.0080.01016.40
7.3.280.0070.00916.43
7.3.270.0130.00916.85
7.3.260.0130.00916.52
7.3.250.0200.00016.44
7.3.240.0100.01216.51
7.3.230.0130.00816.38
7.3.220.0100.00816.42
7.3.210.0050.01016.62
7.3.200.0120.00516.36
7.3.190.0090.01116.55
7.3.180.0100.00716.42
7.3.170.0120.00616.52
7.3.160.0080.01016.53
7.3.150.0090.00916.47
7.3.140.0080.00916.50
7.3.130.0080.01015.90
7.3.120.0100.00915.97
7.3.110.0120.00515.84
7.3.100.0110.00716.10
7.3.90.0090.00916.06
7.3.80.0110.00616.06
7.3.70.0120.00815.96
7.3.60.0090.00916.08
7.3.50.0110.00615.97
7.3.40.0170.00115.99
7.3.30.0080.00816.03
7.3.20.0140.00716.56
7.3.10.0140.00516.47
7.3.00.0120.00916.54
7.2.340.0140.00716.55
7.2.330.0190.00416.68
7.2.320.0090.00916.52
7.2.310.0140.00516.63
7.2.300.0110.00716.81
7.2.290.0120.00616.77
7.2.280.0060.01216.56
7.2.270.0110.00816.64
7.2.260.0120.00616.08
7.2.250.0080.01016.17
7.2.240.0090.01016.21
7.2.230.0090.01016.17
7.2.220.0110.00716.14
7.2.210.0080.00916.24
7.2.200.0130.00716.19
7.2.190.0080.00816.13
7.2.180.0110.00516.17
7.2.170.0070.01116.25
7.2.160.0120.00416.20
7.2.150.0110.00816.68
7.2.140.0120.00616.88
7.2.130.0130.00716.99
7.2.120.0150.00416.95
7.2.110.0140.00316.87
7.2.100.0100.01117.26
7.2.90.0080.01217.46
7.2.80.0140.00317.45
7.2.70.0080.00817.29
7.2.60.0120.00617.35
7.2.50.0150.00417.46
7.2.40.0080.00817.54
7.2.30.0100.01017.41
7.2.20.0090.00918.64
7.2.10.0100.00818.61
7.2.00.0090.01018.65
7.1.330.0150.00616.25
7.1.320.0170.00516.36
7.1.310.0300.00616.33
7.1.300.0130.00616.26
7.1.290.0140.00616.26
7.1.280.0140.00916.34
7.1.270.0150.00616.30
7.1.260.0130.00816.19
7.1.250.0140.00816.20
7.1.240.0130.00816.26
7.1.230.0140.00716.27
7.1.220.0130.00716.35
7.1.210.0110.01016.27
7.1.200.0180.00316.22
7.1.190.0140.00516.13
7.1.180.0130.00816.16
7.1.170.0120.00816.21
7.1.160.0160.01016.22
7.1.150.0140.00716.21
7.1.140.0160.00617.43
7.1.130.0110.00917.52
7.1.120.0140.00817.47
7.1.110.0110.01017.17
7.1.100.0090.01217.30
7.1.90.0120.01017.24
7.1.80.0110.01017.24
7.1.70.0090.01116.70
7.1.60.0220.01025.75
7.1.50.0230.00825.50
7.1.40.0210.01125.35
7.1.30.0200.01325.39
7.1.20.0210.01225.40
7.1.10.0100.01016.39
7.1.00.0100.01016.42
7.0.330.0130.00515.79
7.0.320.0230.00915.98
7.0.310.0140.00615.92
7.0.300.0120.00715.94
7.0.290.0130.00615.82
7.0.280.0140.00615.80
7.0.270.0110.00915.98
7.0.260.0130.00815.85
7.0.250.0130.00816.00
7.0.240.0180.00316.06
7.0.230.0100.01015.90
7.0.220.0160.00415.81
7.0.210.0120.00615.98
7.0.200.0190.00715.98
7.0.190.0130.00816.07
7.0.180.0110.01015.91
7.0.170.0140.00715.93
7.0.160.0180.00616.04
7.0.150.0080.00915.85
7.0.140.0150.00615.95
7.0.130.0110.00915.96
7.0.120.0130.00516.00
7.0.110.0110.00816.00
7.0.100.0190.00615.95
7.0.90.0140.00815.94
7.0.80.0110.01015.83
7.0.70.0100.01115.84
7.0.60.0140.00515.96
7.0.50.0120.00915.90
7.0.40.0140.00515.27
7.0.30.0150.00515.28
7.0.20.0130.01015.24
7.0.10.0120.01015.36
7.0.00.0100.01015.18
5.6.400.0130.00815.62
5.6.390.0100.01015.73
5.6.380.0150.00715.45
5.6.370.0140.00715.54
5.6.360.0150.00615.35
5.6.350.0130.00715.54
5.6.340.0120.00815.47
5.6.330.0130.00715.58
5.6.320.0120.00915.61
5.6.310.0150.00415.58
5.6.300.0150.00515.43
5.6.290.0140.00515.38
5.6.280.0140.00515.51
5.6.270.0110.00915.56
5.6.260.0140.00615.54
5.6.250.0140.00815.44
5.6.240.0120.01015.57
5.6.230.0090.01115.54
5.6.220.0130.00715.55
5.6.210.0110.00715.47
5.6.200.0100.01015.50
5.6.190.0110.00815.47
5.6.180.0120.00815.59
5.6.170.0110.00915.63
5.6.160.0100.01115.44
5.6.150.0150.00615.50
5.6.140.0180.00415.54
5.6.130.0120.01015.65
5.6.120.0120.00815.50
5.6.110.0130.00715.48
5.6.100.0120.00715.43
5.6.90.0160.00515.45
5.6.80.0160.00515.38
5.6.70.0120.00915.41
5.6.60.0150.00815.36
5.6.50.0100.01415.38
5.6.40.0180.00615.46
5.6.30.0130.00915.39
5.6.20.0140.00715.56
5.6.10.0140.00615.46
5.6.00.0120.00715.48

preferences:
30.36 ms | 403 KiB | 5 Q