3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Won Code Library * PRNDL Development Studios, LLC * 11/17/2012 * v1.0.0 */ /* * Get shortname for a day of the week using the day number */ function getDayShortName($dayNum){ $dayNames = array("sun","mon","tue","wed","thur","fri","sat"); return $dayNames[$dayNum]; } /* * Get longname for a day of the week using the day number */ function getDayLongName($dayNum){ $dayNames = array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); return $dayNames[$dayNum]; } /* * Get Full Filter Name from Abbreviation */ function getFilterName($filterAbbreviation) { $filters = array( "R" => "Restuarant", "B" => "Bar", "S" => "Store", "L" => "Lodging", "Q" => "Recreation", "G" => "Gas Station", "E" => "Entertainment", "C" => "Club" ); return $filters[$filterAbbreviation]; } /* * Parse Filterstring and return Where Clause for SQL Queries */ function parseFilterString($filterString) { $returnVal = "";    /*$filterLetters = str_split($filterString, 1);    for($x = 0; $x < strlen($filterString); $x++) {        $returnVal .= "(type <=> '" . getFilterName($filterLetters[$x]) . "') OR ";    }     if (strlen($returnVal) > 0) $returnVal =  substr($returnVal,0,-4); //remove final " OR " from filterstring else $returnVal = "type = 'VOID'"; if everything is filtered, make sure to set type to something not available*/ return $returnVal; } ?>

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.90.0110.05312.02
5.4.80.0120.05512.02
5.4.70.0120.05212.02
5.4.60.0120.05112.02
5.4.50.0130.05712.02
5.4.40.0100.05112.01
5.4.30.0200.06612.00
5.4.20.0190.06912.00
5.4.10.0210.05212.00
5.4.00.0170.05411.50
5.3.190.0120.04912.68
5.3.180.0140.05512.67
5.3.170.0130.05312.67
5.3.160.0170.07712.67
5.3.150.0160.06512.67
5.3.140.0130.05312.66
5.3.130.0140.05312.66
5.3.120.0130.05312.66
5.3.110.0130.06212.66
5.3.100.0140.05512.13
5.3.90.0110.05112.10
5.3.80.0120.04812.09
5.3.70.0120.05812.09
5.3.60.0230.06912.08
5.3.50.0150.05512.02
5.3.40.0140.05812.02
5.3.30.0160.06611.98
5.3.20.0120.05411.76
5.3.10.0130.04711.73
5.3.00.0150.06211.71

preferences:
141.32 ms | 1394 KiB | 7 Q