3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $zip = new ZipArchive; $zip->open( 'test.zip', ZIPARCHIVE::OVERWRITE ); $returnValue = $zip->addGlob('*.{jpg}', GLOB_BRACE); $zip->close(); var_dump($returnValue);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'ZipArchive' not found in /in/1DLst:3 Stack trace: #0 {main} thrown in /in/1DLst on line 3
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: ZipArchive::addGlob(): Invalid or uninitialized Zip object in /in/1DLst on line 5 Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /in/1DLst on line 6 bool(false)
Output for 5.0.0 - 5.1.6, 5.4.34 - 5.6.28
Fatal error: Class 'ZipArchive' not found in /in/1DLst on line 3
Process exited with code 255.
Output for 5.3.0 - 5.4.32
array(0) { }
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method ZipArchive::addGlob() in /in/1DLst on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/1DLst on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/1DLst on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/1DLst on line 4
Process exited with code 255.