3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ll = scandir('./etc'); var_dump($ll);
Output for 7.4.26 - 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.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.25, 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" }

preferences:
289.23 ms | 405 KiB | 381 Q