3v4l.org

run code in 300+ PHP versions simultaneously
<?php // palindrom function anagram($s1, $s2) { $l1 = strlen($s1); $l2 = strlen($s2); if($l1 != $l2) return false; // $w1 = array(); $w2 = array(); // for($a=0; $a<$l1; $a++) { if(array_key_exists($s1[$a], $w1)) { $w1[$s1[$a]] = $w1[$s1[$a]] + 1; print_r($s1[$a]); } else { $w1[$s1[$a]] = 1; } } print_r($w1); } print_r(anagram('test', 'test')); print_r(array('tesfsdf' => 'dasdsad'));

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.0070.01418.43
8.3.50.0140.00621.27
8.3.40.0170.00318.57
8.3.30.0070.00718.67
8.3.20.0080.00018.82
8.3.10.0000.00821.05
8.3.00.0000.00721.77
8.2.180.0080.00818.31
8.2.170.0070.00722.96
8.2.160.0060.00922.08
8.2.150.0040.00424.18
8.2.140.0020.00524.66
8.2.130.0080.00026.16
8.2.120.0060.01021.06
8.2.110.0090.00020.24
8.2.100.0030.01017.72
8.2.90.0040.00417.63
8.2.80.0040.00418.79
8.2.70.0050.00317.50
8.2.60.0000.00817.75
8.2.50.0040.00417.93
8.2.40.0060.00319.77
8.2.30.0060.00321.28
8.2.20.0040.00417.68
8.2.10.0000.00817.60
8.2.00.0040.00417.59
8.1.280.0160.00325.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00723.48
8.1.230.0070.00420.78
8.1.220.0050.00318.53
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.11
8.1.180.0040.00418.10
8.1.170.0080.00017.62
8.1.160.0000.00718.91
8.1.150.0050.00218.69
8.1.140.0040.00417.45
8.1.130.0030.00317.83
8.1.120.0040.00417.30
8.1.110.0040.00417.38
8.1.100.0070.00017.36
8.1.90.0060.00317.46
8.1.80.0060.00317.45
8.1.70.0070.00017.35
8.1.60.0030.00617.61
8.1.50.0000.00717.41
8.1.40.0040.00417.52
8.1.30.0000.00817.66
8.1.20.0050.00317.61
8.1.10.0040.00417.54
8.1.00.0080.00017.47
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0030.00318.33
8.0.270.0070.00017.20
8.0.260.0070.00016.82
8.0.250.0020.00516.90
8.0.240.0040.00416.77
8.0.230.0030.00316.89
8.0.220.0070.00016.80
8.0.210.0040.00416.79
8.0.200.0000.00716.89
8.0.190.0070.00016.86
8.0.180.0050.00216.81
8.0.170.0030.00616.87
8.0.160.0000.00716.77
8.0.150.0000.00716.64
8.0.140.0040.00416.70
8.0.130.0050.00013.18
8.0.120.0040.00416.75
8.0.110.0000.00716.89
8.0.100.0000.00716.70
8.0.90.0050.00316.80
8.0.80.0040.01216.79
8.0.70.0040.00416.63
8.0.60.0030.00516.86
8.0.50.0040.00416.68
8.0.30.0120.00917.31
8.0.20.0090.01017.40
8.0.10.0000.00917.02
8.0.00.0080.01016.67
7.4.330.0050.00014.78
7.4.320.0000.00816.55
7.4.300.0000.00616.61
7.4.290.0070.00016.45
7.4.280.0070.00016.45
7.4.270.0030.00316.61
7.4.260.0000.00513.29
7.4.250.0000.00716.56
7.4.240.0070.00016.41
7.4.230.0030.00316.68
7.4.220.0110.00716.42
7.4.210.0060.00816.49
7.4.200.0050.00316.70
7.4.190.0040.00416.56
7.4.160.0120.00316.28
7.4.150.0090.01117.40
7.4.140.0060.01117.86
7.4.130.0200.01316.42
7.4.120.0080.01216.48
7.4.110.0100.01316.58
7.4.100.0070.01016.38
7.4.90.0110.01116.41
7.4.80.0060.01319.39
7.4.70.0070.01016.52
7.4.60.0040.01216.51
7.4.50.0210.00516.54
7.4.40.0100.00722.77
7.4.30.0120.00916.34
7.4.00.0050.01114.76
7.3.330.0050.00013.28
7.3.320.0000.00513.31
7.3.310.0040.00416.33
7.3.300.0000.00716.29
7.3.290.0070.01416.35
7.3.280.0040.01116.35
7.3.270.0140.00317.40
7.3.260.0120.00718.24
7.3.250.0060.01116.47
7.3.240.0120.00616.41
7.3.230.0110.00716.57
7.3.210.0100.00716.75
7.3.200.0120.00619.39
7.3.190.0110.00616.55
7.3.180.0070.00916.45
7.3.170.0030.01616.39
7.3.160.0100.00616.66
7.3.120.0060.01014.87
7.3.110.0100.00715.05
7.3.100.0070.01114.73
7.3.90.0110.00314.76
7.3.80.0090.00014.85
7.3.70.0070.01014.73
7.3.60.0060.00914.66
7.3.50.0040.00714.70
7.3.40.0100.00314.67
7.3.30.0030.00614.60
7.3.20.0040.01116.69
7.3.10.0090.00416.55
7.3.00.0070.00816.67
7.2.330.0110.00616.78
7.2.320.0120.00616.75
7.2.310.0040.01316.77
7.2.300.0030.01316.59
7.2.290.0100.00716.80
7.2.250.0070.01115.27
7.2.240.0030.01414.86
7.2.230.0090.00614.88
7.2.220.0060.00914.71
7.2.210.0000.01115.15
7.2.200.0030.01014.84
7.2.190.0030.00714.97
7.2.180.0100.00715.00
7.2.170.0060.00914.83
7.2.160.0070.00715.16
7.2.150.0060.01016.86
7.2.140.0060.00917.09
7.2.130.0060.00917.00
7.2.120.0050.01016.76
7.2.110.0050.01016.78
7.2.100.0050.00716.98
7.2.90.0040.00716.82
7.2.80.0060.00817.01
7.2.70.0060.00716.92
7.2.60.0090.00416.84
7.2.50.0040.00617.03
7.2.40.0070.00717.09
7.2.30.0100.00416.79
7.2.20.0050.00816.77
7.2.10.0070.00816.89
7.2.00.0080.00717.81
7.1.330.0070.01015.62
7.1.320.0080.00616.03
7.1.310.0100.00015.89
7.1.300.0030.00715.63
7.1.290.0090.00315.89
7.1.280.0070.00715.78
7.1.270.0030.00915.93
7.1.260.0070.01015.82
7.1.250.0080.00515.73
7.1.240.0030.00915.82
7.1.230.0090.00315.75
7.1.220.0060.00615.93
7.1.210.0000.01015.89
7.1.200.0020.01115.90
7.1.190.0070.00715.79
7.1.180.0100.00315.71
7.1.170.0090.00315.41
7.1.160.0080.00815.87
7.1.150.0030.00915.91
7.1.140.0040.00815.63
7.1.130.0070.00715.52
7.1.120.0070.01115.63
7.1.110.0070.00715.66
7.1.100.0050.00916.70
7.1.90.0040.00415.78
7.1.80.0030.00615.75
7.1.70.0050.00616.21
7.1.60.0090.01017.58
7.1.50.0090.01116.49
7.1.40.0040.00815.92
7.1.30.0090.00315.82
7.1.20.0130.00015.71
7.1.10.0030.01215.76
7.1.00.0080.03518.93
7.0.330.0060.01015.10
7.0.320.0030.01315.44
7.0.310.0030.01015.39
7.0.300.0030.00715.54
7.0.290.0000.01115.24
7.0.280.0030.01315.57
7.0.270.0070.00315.52
7.0.260.0000.01215.39
7.0.250.0100.00715.64
7.0.240.0050.00515.50
7.0.230.0140.00015.44
7.0.220.0120.00015.32
7.0.210.0040.01115.29
7.0.200.0080.00615.95
7.0.190.0040.01215.39
7.0.180.0030.00715.54
7.0.170.0080.00315.50
7.0.160.0030.01015.33
7.0.150.0000.01515.24
7.0.140.0040.04418.87
7.0.130.0060.00615.48
7.0.120.0000.01615.66
7.0.110.0080.00415.27
7.0.100.0030.00915.51
7.0.90.0060.00915.48
7.0.80.0040.00715.38
7.0.70.0130.03818.58
7.0.60.0030.03418.62
7.0.50.0050.04218.90
7.0.40.0080.04316.69
7.0.30.0000.05316.70
7.0.20.0020.04016.82
7.0.10.0070.04216.73
7.0.00.0050.03816.78
5.6.400.0040.00714.26
5.6.390.0100.00314.38
5.6.380.0040.01214.67
5.6.370.0030.00614.65
5.6.360.0070.00414.37
5.6.350.0000.01214.26
5.6.340.0040.01014.66
5.6.330.0000.01114.56
5.6.320.0110.00714.75
5.6.310.0120.00613.91
5.6.300.0060.01014.08
5.6.290.0030.01614.37
5.6.280.0050.04017.76
5.6.270.0080.00814.34
5.6.260.0030.01314.48
5.6.250.0030.01014.60
5.6.240.0130.00314.34
5.6.230.0030.01014.02
5.6.220.0040.02817.29
5.6.210.0000.03317.40
5.6.200.0020.04717.58
5.6.190.0040.03017.64
5.6.180.0070.03917.64
5.6.170.0100.04317.61
5.6.160.0070.04217.75
5.6.150.0020.04717.76
5.6.140.0080.04317.62
5.6.130.0050.04417.58
5.6.120.0070.04517.89
5.6.110.0090.04617.70
5.6.100.0070.04217.69
5.6.90.0070.03217.55
5.6.80.0090.03717.40
5.6.70.0020.04817.30
5.6.60.0050.04517.32
5.6.50.0050.03117.30
5.6.40.0050.04317.24
5.6.30.0020.04617.37
5.6.20.0070.04217.28
5.6.10.0050.02817.19
5.6.00.0060.04517.42
5.5.380.0000.00914.52
5.5.370.0060.00614.12
5.5.360.0070.04017.25
5.5.350.0050.04517.57
5.5.340.0080.04517.51
5.5.330.0020.03917.64
5.5.320.0040.04617.62
5.5.310.0040.03317.50
5.5.300.0030.05017.63
5.5.290.0090.03817.63
5.5.280.0000.03917.57
5.5.270.0100.04017.75
5.5.260.0020.04817.80
5.5.250.0050.03917.46
5.5.240.0080.04217.39
5.5.230.0020.04617.25
5.5.220.0070.04217.20
5.5.210.0050.04317.27
5.5.200.0060.04317.02
5.5.190.0080.04017.28
5.5.180.0090.04017.16
5.5.170.0030.00914.39
5.5.160.0050.04517.15
5.5.150.0020.04317.21
5.5.140.0020.04517.14
5.5.130.0010.03117.26
5.5.120.0070.03217.17
5.5.110.0110.03817.22
5.5.100.0040.04516.96
5.5.90.0040.03917.16
5.5.80.0030.04217.18
5.5.70.0060.03517.25
5.5.60.0050.04017.06
5.5.50.0100.03717.22
5.5.40.0060.03917.26
5.5.30.0030.04717.13
5.5.20.0050.03717.17
5.5.10.0070.04317.14
5.5.00.0100.04017.14
5.4.450.0070.04315.49
5.4.440.0020.03515.36
5.4.430.0070.03615.47
5.4.420.0080.02815.39
5.4.410.0080.03815.29
5.4.400.0070.03715.20
5.4.390.0080.04015.17
5.4.380.0050.04015.16
5.4.370.0030.03215.30
5.4.360.0020.04415.20
5.4.350.0060.02615.25
5.4.340.0030.03015.30
5.4.330.0090.00311.45
5.4.320.0100.03215.29
5.4.310.0080.02515.31
5.4.300.0050.03515.24
5.4.290.0050.04315.24
5.4.280.0020.04115.17
5.4.270.0030.02915.23
5.4.260.0100.03515.14
5.4.250.0030.03715.26
5.4.240.0000.04515.19
5.4.230.0050.03815.16
5.4.220.0060.04015.30
5.4.210.0040.04315.24
5.4.200.0020.03815.28
5.4.190.0050.03815.28
5.4.180.0060.04015.30
5.4.170.0110.03715.28
5.4.160.0050.03015.23
5.4.150.0020.04215.16
5.4.140.0030.04213.95
5.4.130.0020.03313.89
5.4.120.0000.04413.94
5.4.110.0020.04413.90
5.4.100.0050.03013.94
5.4.90.0030.04013.88
5.4.80.0020.02913.95
5.4.70.0030.04013.93
5.4.60.0030.03813.88
5.4.50.0040.03513.89
5.4.40.0060.04013.87
5.4.30.0050.03813.91
5.4.20.0070.04013.93
5.4.10.0020.04413.88
5.4.00.0040.03513.63
5.3.290.0080.04013.09
5.3.280.0030.03712.98
5.3.270.0050.03813.07
5.3.260.0060.04013.05
5.3.250.0020.04213.01
5.3.240.0020.04313.08
5.3.230.0040.03013.03
5.3.220.0020.02512.98
5.3.210.0050.03512.98
5.3.200.0070.03713.02
5.3.190.0030.03712.98
5.3.180.0070.04013.04
5.3.170.0030.02613.00
5.3.160.0050.04113.04
5.3.150.0020.04013.04
5.3.140.0070.03813.03
5.3.130.0040.02713.00
5.3.120.0030.03813.05
5.3.110.0020.03713.02
5.3.100.0030.03512.73
5.3.90.0030.04012.74
5.3.80.0060.03312.69
5.3.70.0020.03812.76
5.3.60.0050.03812.71
5.3.50.0030.04112.68
5.3.40.0020.03212.66
5.3.30.0010.04012.73
5.3.20.0020.02912.61
5.3.10.0030.03012.56
5.3.00.0020.03512.55
5.2.170.0030.03712.34
5.2.160.0070.04712.34
5.2.150.0030.04012.34
5.2.140.0200.04712.34
5.2.130.0030.05712.34
5.2.120.0070.06012.34
5.2.110.0030.06312.34
5.2.100.0030.06012.34
5.2.90.0030.05312.34
5.2.80.0030.06312.34
5.2.70.0000.07012.34
5.2.60.0000.05012.34
5.2.50.0030.06012.34
5.2.40.0070.05712.34
5.2.30.0030.06712.34
5.2.20.0070.06012.34
5.2.10.0000.05712.34
5.2.00.0070.04712.34
5.1.60.0070.05312.34
5.1.50.0070.05712.34
5.1.40.0070.05012.34
5.1.30.0030.04712.34
5.1.20.0000.05312.34
5.1.10.0000.04712.34
5.1.00.0100.05012.34
5.0.50.0030.04312.34
5.0.40.0030.04312.34
5.0.30.0000.06312.34
5.0.20.0030.04312.34
5.0.10.0000.02712.34
5.0.00.0030.06312.34
4.4.90.0000.03012.34
4.4.80.0000.03712.34
4.4.70.0070.03312.34
4.4.60.0030.03312.34
4.4.50.0070.02312.34
4.4.40.0030.03312.34
4.4.30.0070.03312.34
4.4.20.0000.04012.34
4.4.10.0000.03712.34
4.4.00.0000.05712.34
4.3.110.0100.02712.34
4.3.100.0000.03312.34
4.3.90.0000.02312.34
4.3.80.0000.05712.34
4.3.70.0000.03012.34
4.3.60.0000.03012.34
4.3.50.0000.04012.34
4.3.40.0000.05312.34
4.3.30.0000.03712.34
4.3.20.0070.03012.34
4.3.10.0030.03312.34
4.3.00.0030.03312.34

preferences:
69.32 ms | 401 KiB | 5 Q