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) { return count(array_diff(array_merge($a, $b), array_intersect($a, $b))) === 0; } it('consist of the same values', consistsOfTheSameValues([1], [1]) === true ); it('consist of the same values', consistsOfTheSameValues([1, 1], [1, 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['1', 1], ['1', 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['1', 1], [1, '1']) === true ); it('consist of the same values', consistsOfTheSameValues([1, '1'], ['1', 1]) === true ); it('consist of the same values', consistsOfTheSameValues([1, '1'], [1, '1']) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1], ['x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1], ['y' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['y' => 1], ['x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['y' => 1, 'x' => 1], ['x' => 1, 'y' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['y' => 1, 'x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['y' => 1, 'x' => 1], ['y' => 1, 'x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 2]) === true ); it('does not consist of the same values', consistsOfTheSameValues([1], [2]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1'], [1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1], ['1']) === false ); it('does not consist of the same values', consistsOfTheSameValues([1], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], [1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', 1], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, '1'], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], ['1', 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], [1, '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', '1'], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', '1'], ['1', 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', '1'], [1, '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], ['1', '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', 1], ['1', '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, '1'], ['1', '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 1], ['x' => 2]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 2]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 2, 'y' => 1]) === false ); it('does not consist of the same values', 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.3.60.0140.00718.41
8.3.50.0100.01018.17
8.3.40.0120.00418.68
8.3.30.0140.00018.45
8.3.20.0040.00419.34
8.3.10.0000.00821.91
8.3.00.0100.00318.90
8.2.180.0070.01118.29
8.2.170.0070.00719.08
8.2.160.0100.00322.96
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00820.98
8.2.110.0040.00420.63
8.2.100.0000.01217.97
8.2.90.0000.00819.30
8.2.80.0000.00817.97
8.2.70.0080.00017.75
8.2.60.0040.00417.63
8.2.50.0060.00319.10
8.2.40.0050.00318.35
8.2.30.0050.00318.23
8.2.20.0040.00417.72
8.2.10.0000.00718.16
8.2.00.0040.00418.07
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0000.00926.35
8.1.250.0060.00328.09
8.1.240.0090.00021.06
8.1.230.0040.00719.08
8.1.220.0000.00817.78
8.1.210.0030.00618.77
8.1.200.0100.00017.36
8.1.190.0000.00817.35
8.1.180.0060.00318.10
8.1.170.0080.00018.75
8.1.160.0030.00619.01
8.1.150.0040.00418.93
8.1.140.0090.00019.74
8.1.130.0070.00017.49
8.1.120.0070.00017.66
8.1.110.0040.00417.56
8.1.100.0000.00717.61
8.1.90.0040.00417.59
8.1.80.0040.00417.62
8.1.70.0070.00017.50
8.1.60.0040.00417.68
8.1.50.0000.00817.65
8.1.40.0040.00417.57
8.1.30.0090.00017.85
8.1.20.0020.00517.83
8.1.10.0000.00817.61
8.1.00.0090.00017.51
8.0.300.0050.00519.15
8.0.290.0000.00816.74
8.0.280.0000.00718.48
8.0.270.0000.00717.28
8.0.260.0040.00416.88
8.0.250.0050.00317.04
8.0.240.0070.00017.01
8.0.230.0070.00317.00
8.0.220.0000.00716.86
8.0.210.0000.00816.97
8.0.200.0020.00516.99
8.0.190.0050.00217.05
8.0.180.0000.00717.01
8.0.170.0000.00816.98
8.0.160.0000.00716.84
8.0.150.0070.00016.80
8.0.140.0000.00816.85
8.0.130.0000.00613.43
8.0.120.0080.00016.82
8.0.110.0000.00816.80
8.0.100.0000.00716.95
8.0.90.0000.00816.86
8.0.80.0090.00616.91
8.0.70.0050.00316.86
8.0.60.0000.00716.84
8.0.50.0040.00416.81
8.0.30.0140.00417.13
8.0.20.0160.00417.43
8.0.10.0050.00217.18
8.0.00.0100.00716.96
7.4.330.0050.00015.16
7.4.320.0030.00316.63
7.4.300.0080.00016.73
7.4.290.0000.00716.69
7.4.280.0030.00616.48
7.4.270.0080.00016.53
7.4.260.0000.00816.52
7.4.250.0030.00516.59
7.4.240.0070.00016.65
7.4.230.0000.00716.53
7.4.220.0120.00616.72
7.4.210.0040.01216.81
7.4.200.0040.00416.77
7.4.160.0050.01316.46
7.4.150.0120.00617.40
7.4.140.0110.00617.86
7.4.130.0090.01116.50
7.4.120.0080.01116.62
7.4.110.0090.00916.64
7.4.100.0110.00716.79
7.4.90.0070.01316.61
7.4.80.0090.00619.39
7.4.70.0070.01116.48
7.4.60.0070.01016.66
7.4.50.0000.01416.75
7.4.40.0110.00716.50
7.4.30.0060.01116.69
7.4.00.0100.00314.88
7.3.330.0070.00013.30
7.3.320.0020.00213.51
7.3.310.0040.00416.33
7.3.300.0030.00316.44
7.3.290.0070.00816.47
7.3.280.0080.01016.42
7.3.270.0130.00517.40
7.3.260.0080.01016.69
7.3.250.0120.00716.52
7.3.240.0100.00916.73
7.3.230.0030.01516.46
7.3.210.0080.00816.53
7.3.200.0100.01016.54
7.3.190.0070.01116.43
7.3.180.0070.01016.63
7.3.170.0090.00616.74
7.3.160.0100.00716.62
7.2.330.0080.01016.85
7.2.320.0110.01716.92
7.2.310.0140.00516.90
7.2.300.0080.01216.98
7.2.290.0090.01616.99
7.2.60.0090.00617.11
7.1.200.0100.00315.85
7.1.70.0000.01017.19
7.1.60.0040.02119.47
7.1.50.0070.01117.02
7.1.00.0130.06722.36
7.0.200.0300.00015.17
7.0.70.1370.07020.09
7.0.60.1330.05020.19
7.0.50.1300.06320.33
7.0.40.1470.05320.49
7.0.30.1470.05020.49
7.0.20.1200.07320.54
7.0.10.1370.06720.55
7.0.00.1370.05320.50
5.6.220.0830.06020.79
5.6.210.1030.05320.67
5.6.200.1230.06721.07
5.6.190.1000.06321.10
5.6.180.1270.07321.21
5.6.170.1030.06721.21
5.6.160.1530.07721.21
5.6.150.1470.06021.22
5.6.140.1300.06021.04
5.6.130.1370.06321.16
5.6.120.0130.06021.11
5.6.110.0630.06721.16
5.6.100.1170.05721.21
5.6.90.1300.06721.12
5.6.80.1270.06020.61
5.6.70.1430.04720.49
5.6.60.1370.04320.41
5.6.50.1100.06020.61
5.6.40.1270.04720.50
5.6.30.1330.04320.55
5.6.20.1230.05720.42
5.6.10.1270.05020.48
5.6.00.1230.05320.55
5.5.360.1330.06020.46
5.5.350.1370.05320.55
5.5.340.1200.06020.99
5.5.330.1300.05320.98
5.5.320.1400.06720.98
5.5.310.1030.06020.88
5.5.300.1370.06020.91
5.5.290.1470.06020.75
5.5.280.0200.06720.80
5.5.270.1170.06321.04
5.5.260.1130.07020.75
5.5.250.1400.05720.68
5.5.240.1370.05020.23
5.5.230.1300.05320.32
5.5.220.1100.06720.35
5.5.210.1270.05720.21
5.5.200.1270.05020.24
5.5.190.1230.05320.20
5.5.180.1230.06320.23
5.5.160.1200.05720.23
5.5.150.1270.05320.25
5.5.140.1230.05320.25
5.5.130.1230.05320.39
5.5.120.1200.05320.39
5.5.110.1270.05020.29
5.5.100.1300.05020.18
5.5.90.1230.06020.22
5.5.80.1330.06320.19
5.5.70.1300.06720.13
5.5.60.1370.06720.21
5.5.50.1100.05020.19
5.5.40.1100.05720.20
5.5.30.1300.05720.27
5.5.20.1230.05720.20
5.5.10.1170.06020.16
5.5.00.1370.05020.14

preferences:
58.65 ms | 401 KiB | 5 Q