3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dir = '/var/tmp'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2); ?> ?>
Output for 7.2.0
Warning: scandir(/var/tmp): failed to open dir: Permission denied in /in/Su8ss on line 3 Warning: scandir(): (errno 13): Permission denied in /in/Su8ss on line 3 Warning: scandir(/var/tmp): failed to open dir: Permission denied in /in/Su8ss on line 4 Warning: scandir(): (errno 13): Permission denied in /in/Su8ss on line 4 ?>
Output for 7.1.10
Array ( [0] => . [1] => .. [2] => hhbc-180de793e1127a8fabd630a2781561c48831765b.sqlite3 [3] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [4] => hhbc-32132274743631b0bd1a2273911cc228e60c98cc.sqlite3 [5] => hhbc-3fe098bc621439cb70cc8cf2c72899342463da2e.sqlite3 [6] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [7] => hhbc-4c050897b92a6aed73206b7eaed90b6a67e4e414.sqlite3 [8] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [9] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [10] => hhbc-5f01d16e693d465ff8c0b7d5f74f976a4996caa0.sqlite3 [11] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [12] => hhbc-68c9b831b56bea5d8c90f6fca5ea358cdaaea626.sqlite3 [13] => hhbc-6c99ee1f98340f6f3ef397a332583f0e843a627d.sqlite3 [14] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [15] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [16] => hhbc-8b80ba45250a6669cd610c189dbbb55b6218c2a3.sqlite3 [17] => hhbc-8c57ad2276433d9fafaf454878290df2e75e03a0.sqlite3 [18] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [19] => hhbc-b9aebb86bbda024eeeed6f608c9a49076563f9c7.sqlite3 [20] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [21] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [22] => hhbc-feb4a756d59496939a6752ca9dcf0e46c9f81cff.sqlite3 ) Array ( [0] => hhbc-feb4a756d59496939a6752ca9dcf0e46c9f81cff.sqlite3 [1] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [2] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [3] => hhbc-b9aebb86bbda024eeeed6f608c9a49076563f9c7.sqlite3 [4] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [5] => hhbc-8c57ad2276433d9fafaf454878290df2e75e03a0.sqlite3 [6] => hhbc-8b80ba45250a6669cd610c189dbbb55b6218c2a3.sqlite3 [7] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [8] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [9] => hhbc-6c99ee1f98340f6f3ef397a332583f0e843a627d.sqlite3 [10] => hhbc-68c9b831b56bea5d8c90f6fca5ea358cdaaea626.sqlite3 [11] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [12] => hhbc-5f01d16e693d465ff8c0b7d5f74f976a4996caa0.sqlite3 [13] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [14] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [15] => hhbc-4c050897b92a6aed73206b7eaed90b6a67e4e414.sqlite3 [16] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [17] => hhbc-3fe098bc621439cb70cc8cf2c72899342463da2e.sqlite3 [18] => hhbc-32132274743631b0bd1a2273911cc228e60c98cc.sqlite3 [19] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [20] => hhbc-180de793e1127a8fabd630a2781561c48831765b.sqlite3 [21] => .. [22] => . ) ?>
Output for 7.1.5 - 7.1.7
Array ( [0] => . [1] => .. [2] => .ips1.txt [3] => hhbc-180de793e1127a8fabd630a2781561c48831765b.sqlite3 [4] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [5] => hhbc-32132274743631b0bd1a2273911cc228e60c98cc.sqlite3 [6] => hhbc-3fe098bc621439cb70cc8cf2c72899342463da2e.sqlite3 [7] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [8] => hhbc-4c050897b92a6aed73206b7eaed90b6a67e4e414.sqlite3 [9] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [10] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [11] => hhbc-5f01d16e693d465ff8c0b7d5f74f976a4996caa0.sqlite3 [12] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [13] => hhbc-68c9b831b56bea5d8c90f6fca5ea358cdaaea626.sqlite3 [14] => hhbc-6c99ee1f98340f6f3ef397a332583f0e843a627d.sqlite3 [15] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [16] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [17] => hhbc-8b80ba45250a6669cd610c189dbbb55b6218c2a3.sqlite3 [18] => hhbc-8c57ad2276433d9fafaf454878290df2e75e03a0.sqlite3 [19] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [20] => hhbc-b9aebb86bbda024eeeed6f608c9a49076563f9c7.sqlite3 [21] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [22] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [23] => hhbc-feb4a756d59496939a6752ca9dcf0e46c9f81cff.sqlite3 [24] => my-errors.log [25] => test.tst [26] => texto.txt ) Array ( [0] => texto.txt [1] => test.tst [2] => my-errors.log [3] => hhbc-feb4a756d59496939a6752ca9dcf0e46c9f81cff.sqlite3 [4] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [5] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [6] => hhbc-b9aebb86bbda024eeeed6f608c9a49076563f9c7.sqlite3 [7] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [8] => hhbc-8c57ad2276433d9fafaf454878290df2e75e03a0.sqlite3 [9] => hhbc-8b80ba45250a6669cd610c189dbbb55b6218c2a3.sqlite3 [10] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [11] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [12] => hhbc-6c99ee1f98340f6f3ef397a332583f0e843a627d.sqlite3 [13] => hhbc-68c9b831b56bea5d8c90f6fca5ea358cdaaea626.sqlite3 [14] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [15] => hhbc-5f01d16e693d465ff8c0b7d5f74f976a4996caa0.sqlite3 [16] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [17] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [18] => hhbc-4c050897b92a6aed73206b7eaed90b6a67e4e414.sqlite3 [19] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [20] => hhbc-3fe098bc621439cb70cc8cf2c72899342463da2e.sqlite3 [21] => hhbc-32132274743631b0bd1a2273911cc228e60c98cc.sqlite3 [22] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [23] => hhbc-180de793e1127a8fabd630a2781561c48831765b.sqlite3 [24] => .ips1.txt [25] => .. [26] => . ) ?>
Output for 5.0.0 - 7.0.14, 7.1.0
Array ( [0] => . [1] => .. [2] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [3] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [4] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [5] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [6] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [7] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [8] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [9] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [10] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [11] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 ) Array ( [0] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [1] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [2] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [3] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [4] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [5] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [6] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [7] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [8] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [9] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [10] => .. [11] => . ) ?>
Output for 7.0.20
Array ( [0] => . [1] => .. [2] => hhbc-180de793e1127a8fabd630a2781561c48831765b.sqlite3 [3] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [4] => hhbc-32132274743631b0bd1a2273911cc228e60c98cc.sqlite3 [5] => hhbc-3fe098bc621439cb70cc8cf2c72899342463da2e.sqlite3 [6] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [7] => hhbc-4c050897b92a6aed73206b7eaed90b6a67e4e414.sqlite3 [8] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [9] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [10] => hhbc-5f01d16e693d465ff8c0b7d5f74f976a4996caa0.sqlite3 [11] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [12] => hhbc-68c9b831b56bea5d8c90f6fca5ea358cdaaea626.sqlite3 [13] => hhbc-6c99ee1f98340f6f3ef397a332583f0e843a627d.sqlite3 [14] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [15] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [16] => hhbc-8b80ba45250a6669cd610c189dbbb55b6218c2a3.sqlite3 [17] => hhbc-8c57ad2276433d9fafaf454878290df2e75e03a0.sqlite3 [18] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [19] => hhbc-b9aebb86bbda024eeeed6f608c9a49076563f9c7.sqlite3 [20] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [21] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [22] => hhbc-feb4a756d59496939a6752ca9dcf0e46c9f81cff.sqlite3 [23] => my-errors.log [24] => test.tst [25] => texto.txt ) Array ( [0] => texto.txt [1] => test.tst [2] => my-errors.log [3] => hhbc-feb4a756d59496939a6752ca9dcf0e46c9f81cff.sqlite3 [4] => hhbc-fd53a034d154553fb52ef0fc54dbe49ff1c7c10b.sqlite3 [5] => hhbc-f6de3214edab8aa7570be68f12317f40bfe1221d.sqlite3 [6] => hhbc-b9aebb86bbda024eeeed6f608c9a49076563f9c7.sqlite3 [7] => hhbc-ad53673037439e3b77b6a64cb21ec130ec69c4d2.sqlite3 [8] => hhbc-8c57ad2276433d9fafaf454878290df2e75e03a0.sqlite3 [9] => hhbc-8b80ba45250a6669cd610c189dbbb55b6218c2a3.sqlite3 [10] => hhbc-862bd51c10a685e6bd9f97430146a9d3fa16aed9.sqlite3 [11] => hhbc-8504c2e848bc8a3ed7a5698ca9c06f658ac9779b.sqlite3 [12] => hhbc-6c99ee1f98340f6f3ef397a332583f0e843a627d.sqlite3 [13] => hhbc-68c9b831b56bea5d8c90f6fca5ea358cdaaea626.sqlite3 [14] => hhbc-64ef2f0cc202814e416e93ed6335e2ff627a2207.sqlite3 [15] => hhbc-5f01d16e693d465ff8c0b7d5f74f976a4996caa0.sqlite3 [16] => hhbc-5be9b3e8f9639ac359987b8d6e27ecd59de500dd.sqlite3 [17] => hhbc-4df25a721704eccd6ec92e0cc3fa2d7e34f1fbf9.sqlite3 [18] => hhbc-4c050897b92a6aed73206b7eaed90b6a67e4e414.sqlite3 [19] => hhbc-479647c3ad87f2e920ac085aa1424e2b8101da45.sqlite3 [20] => hhbc-3fe098bc621439cb70cc8cf2c72899342463da2e.sqlite3 [21] => hhbc-32132274743631b0bd1a2273911cc228e60c98cc.sqlite3 [22] => hhbc-1a98688c77d0d3c9fbbefdba4ff634e985503867.sqlite3 [23] => hhbc-180de793e1127a8fabd630a2781561c48831765b.sqlite3 [24] => .. [25] => . ) ?>
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: scandir() in /in/Su8ss on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: scandir() in /in/Su8ss on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: scandir() in /in/Su8ss on line 3