3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "ryat\0hi"; var_dump($str); $str = addslashes($str); file_put_contents('/tmp/ryat', $str); var_dump(file_get_contents('/tmp/ryat'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PIoTe
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ryat%00hi'
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'addslashes'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    6     8        INIT_FCALL                                               'file_put_contents'
          9        SEND_VAL                                                 '%2Ftmp%2Fryat'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'file_get_contents'
         14        SEND_VAL                                                 '%2Ftmp%2Fryat'
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.12 ms | 1394 KiB | 21 Q