3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fp = fopen('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', 'r'); stream_set_blocking($fp, 0); stream_set_timeout($fp, 10); var_dump(fread($fp, PHP_INT_MAX));
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 9223372036854775832 bytes) in /in/aIlhN on line 7
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: String length exceeded 2^31-2: 9223372036854775807 in /in/aIlhN on line 7
Process exited with code 255.
Output for 5.5.36 - 5.5.37, 5.6.22 - 5.6.28
Warning: fread(): Length parameter must be no more than 2147483647 in /in/aIlhN on line 7 bool(false)
Output for 5.3.0 - 5.5.35, 5.6.0 - 5.6.21
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 9223372036854775808 bytes) in /in/aIlhN on line 7
Process exited with code 255.
Output for 5.2.0 - 5.2.17
Warning: fread(): Length parameter must be greater than 0 in /in/aIlhN on line 7 bool(false)
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.1.6
Warning: fopen(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=): failed to open stream: No such file or directory in /in/aIlhN on line 2 Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /in/aIlhN on line 4 Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /in/aIlhN on line 5 Warning: fread(): supplied argument is not a valid stream resource in /in/aIlhN on line 7 bool(false)
Output for 4.3.5 - 4.3.11, 5.0.0 - 5.0.4
Warning: fopen(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=): failed to open stream: No such file or directory in /in/aIlhN on line 2 Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /in/aIlhN on line 4 Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /in/aIlhN on line 5 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/aIlhN on line 7 Warning: fread(): supplied argument is not a valid stream resource in /in/aIlhN on line 7 bool(false)
Output for 4.3.2 - 4.3.4
Warning: fopen(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=): failed to open stream: No such file or directory in /in/aIlhN on line 2 Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /in/aIlhN on line 4 Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /in/aIlhN on line 5 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/aIlhN on line 7 Warning: fread(): supplied argument is not a valid stream resource in /in/aIlhN on line 7 NULL
Output for 4.3.0 - 4.3.1
Warning: fopen(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=) [http://www.php.net/function.fopen]: failed to create stream: No such file or directory in /in/aIlhN on line 2 Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /in/aIlhN on line 4 Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /in/aIlhN on line 5 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/aIlhN on line 7 Warning: fread(): supplied argument is not a valid stream resource in /in/aIlhN on line 7 NULL