3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4PjFM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $myfile, !1 = $txt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'newfile.txt'
          2        SEND_VAL                                                 'w'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                           ~3      !0, $2
          5      > JMPNZ_EX                                         ~3      ~3, ->8
          6    > > EXIT                                                     'Unable+to+open+file%21'
          7*       BOOL                                             ~3      <true>
    3     8    >   ASSIGN                                                   !1, 'John+Doe%0A'
    4     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    5    13        ASSIGN                                                   !1, 'Jane+Doe%0A'
    6    14        INIT_FCALL                                               'fwrite'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
    7    18        INIT_FCALL                                               'fclose'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
    8    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.23 ms | 1395 KiB | 19 Q