3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = microtime(true); for ($i = 0; $i < 10000; $i++) { $array = []; foreach ($_SERVER as $key => $value) { if (0 === strpos($key, 'SCRIPT_')) { $array[] = $key; } } } var_dump($array, microtime(true) - $time);
Output for 7.1.0
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.015087127685547)
Output for 7.0.14
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.014956951141357)
Output for 7.0.6
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.010730028152466)
Output for 7.0.5
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.0080039501190186)
Output for 7.0.4
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.012162923812866)
Output for 7.0.3
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.011351108551025)
Output for 7.0.2
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.0084991455078125)
Output for 7.0.1
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.0093841552734375)
Output for 7.0.0
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.012211084365845)
Output for 5.6.28
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.064793109893799)
Output for 5.6.21
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.048333883285522)
Output for 5.6.20
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.052711963653564)
Output for 5.6.19
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.040207147598267)
Output for 5.6.18
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.042807102203369)
Output for 5.6.17
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.065906047821045)
Output for 5.6.16
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.049494028091431)
Output for 5.6.15
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.043023824691772)
Output for 5.6.14
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.051921129226685)
Output for 5.6.13
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.051321983337402)
Output for 5.6.12
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.067694187164307)
Output for 5.6.11
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.050664901733398)
Output for 5.6.10
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.040606021881104)
Output for 5.6.9
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.0435791015625)
Output for 5.6.8
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.052049160003662)
Output for 5.5.35
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.051182985305786)
Output for 5.5.34
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.054772138595581)
Output for 5.5.33
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.049437046051025)
Output for 5.5.32
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.047704935073853)
Output for 5.5.31
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.049624919891357)
Output for 5.5.30
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.05388617515564)
Output for 5.5.29
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.053080081939697)
Output for 5.5.28
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.047733068466187)
Output for 5.5.27
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.051496982574463)
Output for 5.5.26
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.052775144577026)
Output for 5.5.25
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.05019998550415)
Output for 5.5.24
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.063075065612793)
Output for 5.4.45
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038294076919556)
Output for 5.4.44
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.03826904296875)
Output for 5.4.43
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.039438009262085)
Output for 5.4.42
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038110971450806)
Output for 5.4.41
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.039086103439331)
Output for 5.4.40
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037857055664062)
Output for 5.4.39
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.03767204284668)
Output for 5.4.38
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.040799856185913)
Output for 5.4.37
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038635015487671)
Output for 5.4.36
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.055566072463989)
Output for 5.4.35
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038774967193604)
Output for 5.4.34
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038572788238525)
Output for 5.4.32
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.039038896560669)
Output for 5.4.31
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038728952407837)
Output for 5.4.30
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038400173187256)
Output for 5.4.29
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.03830099105835)
Output for 5.4.28
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038508176803589)
Output for 5.4.27
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037447929382324)
Output for 5.4.26
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.041229009628296)
Output for 5.4.25
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.052214860916138)
Output for 5.4.24
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037109136581421)
Output for 5.4.23
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037307024002075)
Output for 5.4.22
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.052613973617554)
Output for 5.4.21
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037508010864258)
Output for 5.4.20
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.036005973815918)
Output for 5.4.19
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037911176681519)
Output for 5.4.18
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.039151906967163)
Output for 5.4.17
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.036535978317261)
Output for 5.4.16
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037836074829102)
Output for 5.4.15
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038809061050415)
Output for 5.4.14
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.051147937774658)
Output for 5.4.13
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037398815155029)
Output for 5.4.12
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038257122039795)
Output for 5.4.11
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037975788116455)
Output for 5.4.10
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.03837513923645)
Output for 5.4.9
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.03787088394165)
Output for 5.4.8
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038130044937134)
Output for 5.4.7
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037998914718628)
Output for 5.4.6
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037765026092529)
Output for 5.4.5
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038442134857178)
Output for 5.4.4
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038089036941528)
Output for 5.4.3
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037961006164551)
Output for 5.4.2
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.038833856582642)
Output for 5.4.1
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.039103984832764)
Output for 5.4.0
array(2) { [0]=> string(11) "SCRIPT_NAME" [1]=> string(15) "SCRIPT_FILENAME" } float(0.037710905075073)
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/2rGNs on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/2rGNs on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/2rGNs on line 6
Process exited with code 255.