3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $handle = tmpfile(); $meta = stream_get_meta_data($handle); $tempfile = $meta['uri']; echo dirname($tempfile), "\n"; echo sys_get_temp_dir(), "\n";
based on QIc1Z
Output for 5.2.1 - 7.1.0
/tmp /tmp
Output for 5.1.0 - 5.2.0
/tmp Fatal error: Call to undefined function sys_get_temp_dir() in /in/MLE0A on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Notice: Undefined index: uri in /in/MLE0A on line 5 Fatal error: Call to undefined function sys_get_temp_dir() in /in/MLE0A on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined index: uri in /in/MLE0A on line 5 Fatal error: Call to undefined function: sys_get_temp_dir() in /in/MLE0A on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined index: uri in /in/MLE0A on line 5 Fatal error: Call to undefined function: sys_get_temp_dir() in /in/MLE0A on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: uri in /in/MLE0A on line 5 Fatal error: Call to undefined function: sys_get_temp_dir() in /in/MLE0A on line 8