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')); // 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/ig6PY
function name:  (null)
number of ops:  35
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        INIT_FCALL                                               'dirname'
         16        SEND_VAL                                                 '%2Fusr%2Fbin%2Fphp-8.0.0'
         17        DO_ICALL                                         $7      
         18        CONCAT                                           ~8      '%2Ftmp%2F%3A', $7
         19        ASSIGN                                                   !0, ~8
   11    20        INIT_FCALL                                               'ini_set'
         21        SEND_VAL                                                 'open_basedir'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
   12    24        CONCAT                                           ~11     'ini_set+to+', !0
         25        CONCAT                                           ~12     ~11, '%0A'
         26        ECHO                                                     ~12
   13    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'file_put_contents'
         29        SEND_VAL                                                 '%2Ftmp%2Fhhvm-openbasedir-test'
         30        SEND_VAL                                                 'some+data'
         31        DO_ICALL                                         $13     
         32        SEND_VAR                                                 $13
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.78 ms | 1396 KiB | 21 Q