3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(scandir('/etc'));
Output for 7.4.27 - 7.4.33, 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
array(28) { [0]=> string(1) "." [1]=> string(2) ".." [2]=> string(12) "arch-release" [3]=> string(8) "crypttab" [4]=> string(5) "fstab" [5]=> string(5) "group" [6]=> string(7) "gshadow" [7]=> string(9) "host.conf" [8]=> string(5) "hosts" [9]=> string(5) "issue" [10]=> string(10) "ld.so.conf" [11]=> string(12) "ld.so.conf.d" [12]=> string(4) "motd" [13]=> string(4) "mtab" [14]=> string(13) "nsswitch.conf" [15]=> string(8) "pacman.d" [16]=> string(6) "passwd" [17]=> string(7) "php.ini" [18]=> string(15) "php_archive.ini" [19]=> string(7) "profile" [20]=> string(9) "profile.d" [21]=> string(9) "protocols" [22]=> string(11) "resolv.conf" [23]=> string(9) "securetty" [24]=> string(8) "services" [25]=> string(6) "shadow" [26]=> string(6) "shells" [27]=> string(4) "skel" }
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.26, 8.0.0 - 8.0.13
array(26) { [0]=> string(1) "." [1]=> string(2) ".." [2]=> string(12) "arch-release" [3]=> string(8) "crypttab" [4]=> string(5) "fstab" [5]=> string(5) "group" [6]=> string(7) "gshadow" [7]=> string(9) "host.conf" [8]=> string(5) "hosts" [9]=> string(5) "issue" [10]=> string(10) "ld.so.conf" [11]=> string(12) "ld.so.conf.d" [12]=> string(4) "motd" [13]=> string(4) "mtab" [14]=> string(13) "nsswitch.conf" [15]=> string(8) "pacman.d" [16]=> string(6) "passwd" [17]=> string(7) "profile" [18]=> string(9) "profile.d" [19]=> string(9) "protocols" [20]=> string(11) "resolv.conf" [21]=> string(9) "securetty" [22]=> string(8) "services" [23]=> string(6) "shadow" [24]=> string(6) "shells" [25]=> string(4) "skel" }
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: scandir() in <b>/in/dGMlA</b> on line <b>1</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: scandir() in <b>/in/dGMlA</b> on line <b>1</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: scandir() in <b>/in/dGMlA</b> on line <b>1</b><br />

preferences:
311.05 ms | 401 KiB | 464 Q