3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Source: https://bugs.php.net/bug.php?id=61225 $wyraz1= "baba"; $wyraz2="abba"; function testWyraz($wyraz){ $isAnagram = array(); for ($i=0;$i<strlen($wyraz);$i++) { if (isset($isAnagram[$wyraz[$i]])) $isAnagram[$wyraz[$i]]++; else $isAnagram[$wyraz[$i]] = 1; } ksort($isAnagram); return $isAnagram; } function testAnagram($wyraz,$wyraz2) { if (strlen($wyraz) == strlen($wyraz2)) { if (testWyraz($wyraz1) == testWyraz($wyraz2)) { echo "identical"; } else {echo "not ident.";} else {echo "rozne dlugosci";} } print_r($wyn1);

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)
5.4.190.0320.08812.40
5.4.180.0160.04112.40
5.4.170.0180.04412.41
5.4.160.0160.04612.40
5.4.150.0160.05012.40
5.4.140.0170.04212.09
5.4.130.0230.03512.07
5.4.120.0180.04012.04
5.4.110.0130.05112.04
5.4.100.0140.04912.04
5.4.90.0190.04312.04
5.4.80.0150.04412.03
5.4.70.0140.04512.03
5.4.60.0190.04312.03
5.4.50.0330.08912.03
5.4.40.0210.04612.01
5.4.30.0150.04512.01
5.4.20.0250.04012.01
5.4.10.0310.09312.01
5.4.00.0180.04711.50
5.3.270.0270.04112.72
5.3.260.0290.03812.72
5.3.250.0210.04612.72
5.3.240.0300.06812.71
5.3.230.0110.05412.71
5.3.220.0280.04912.68
5.3.210.0440.15612.68
5.3.200.0470.12312.68
5.3.190.0190.05612.67
5.3.180.0510.08612.67
5.3.170.0220.05212.67
5.3.160.0390.09812.67
5.3.150.0410.08712.67
5.3.140.0190.04912.66
5.3.130.0290.07212.66
5.3.120.0240.05012.66
5.3.110.0760.16812.66
5.3.100.0200.05612.13
5.3.90.0540.08112.11
5.3.80.0260.04512.10
5.3.70.0210.04812.09
5.3.60.0400.09012.08
5.3.50.0200.04812.03
5.3.40.0400.08512.02
5.3.30.0200.04311.99
5.3.20.0190.04511.77
5.3.10.0420.08211.74
5.3.00.0170.04611.71

preferences:
142.55 ms | 1394 KiB | 7 Q