3v4l.org

run code in 300+ PHP versions simultaneously
<?php // no separator $dir = '/tmp/'; ini_set('open_basedir', $dir); print("ini_set to ".$dir."\n"); var_dump(file_put_contents('/tmp/hhvm-openbasedir-test', 'some data')); // no separator $dir = ''; ini_set('open_basedir', $dir); print("ini_set to ".$dir."\n"); var_dump(file_put_contents('/tmp/hhvm-openbasedir-test', 'some data')); // with separator $dir = '/tmp/'.PATH_SEPARATOR.dirname(PHP_BINARY); ini_set('open_basedir', $dir); print("ini_set to ".$dir."\n"); var_dump(file_put_contents('/tmp/hhvm-openbasedir-test', 'some data'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ouBvh
function name:  (null)
number of ops:  50
compiled vars:  !0 = $dir
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%2Ftmp%2F'
    5     1        INIT_FCALL                                               'ini_set'
          2        SEND_VAL                                                 'open_basedir'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5        CONCAT                                           ~3      'ini_set+to+', !0
          6        CONCAT                                           ~4      ~3, '%0A'
          7        ECHO                                                     ~4
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'file_put_contents'
         10        SEND_VAL                                                 '%2Ftmp%2Fhhvm-openbasedir-test'
         11        SEND_VAL                                                 'some+data'
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
   10    15        ASSIGN                                                   !0, ''
   11    16        INIT_FCALL                                               'ini_set'
         17        SEND_VAL                                                 'open_basedir'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
   12    20        CONCAT                                           ~9      'ini_set+to+', !0
         21        CONCAT                                           ~10     ~9, '%0A'
         22        ECHO                                                     ~10
   13    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'file_put_contents'
         25        SEND_VAL                                                 '%2Ftmp%2Fhhvm-openbasedir-test'
         26        SEND_VAL                                                 'some+data'
         27        DO_ICALL                                         $11     
         28        SEND_VAR                                                 $11
         29        DO_ICALL                                                 
   17    30        INIT_FCALL                                               'dirname'
         31        SEND_VAL                                                 '%2Fusr%2Fbin%2Fphp-8.0.0'
         32        DO_ICALL                                         $13     
         33        CONCAT                                           ~14     '%2Ftmp%2F%3A', $13
         34        ASSIGN                                                   !0, ~14
   18    35        INIT_FCALL                                               'ini_set'
         36        SEND_VAL                                                 'open_basedir'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                                 
   19    39        CONCAT                                           ~17     'ini_set+to+', !0
         40        CONCAT                                           ~18     ~17, '%0A'
         41        ECHO                                                     ~18
   20    42        INIT_FCALL                                               'var_dump'
         43        INIT_FCALL                                               'file_put_contents'
         44        SEND_VAL                                                 '%2Ftmp%2Fhhvm-openbasedir-test'
         45        SEND_VAL                                                 'some+data'
         46        DO_ICALL                                         $19     
         47        SEND_VAR                                                 $19
         48        DO_ICALL                                                 
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.77 ms | 1400 KiB | 21 Q