3v4l.org

run code in 500+ PHP versions simultaneously
<?php register_shutdown_function ('shutdown'); file_put_contents ('/tmp/test.txt', "main 1 \n", FILE_APPEND | LOCK_EX); file_put_contents ('/tmp/test.txt', "main 2 \n", FILE_APPEND | LOCK_EX); function shutdown () { file_put_contents ('/tmp/test.txt', "shutdown 1 \n", FILE_APPEND | LOCK_EX); file_put_contents ('/tmp/test.txt', "shutdown 2 \n", FILE_APPEND | LOCK_EX); var_dump(file_get_contents("/tmp/test.txt")); exit; }

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MM3fT
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'register_shutdown_function'
          1        SEND_VAL                                                     'shutdown'
          2        DO_ICALL                                                     
    4     3        INIT_FCALL                                                   'file_put_contents'
          4        SEND_VAL                                                     '%2Ftmp%2Ftest.txt'
          5        SEND_VAL                                                     'main+1+%0A'
          6        SEND_VAL                                                     10
          7        DO_ICALL                                                     
    5     8        INIT_FCALL                                                   'file_put_contents'
          9        SEND_VAL                                                     '%2Ftmp%2Ftest.txt'
         10        SEND_VAL                                                     'main+2+%0A'
         11        SEND_VAL                                                     10
         12        DO_ICALL                                                     
   13    13      > RETURN                                                       1

Function shutdown:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 61) Position 1 = -2
filename:       /in/MM3fT
function name:  shutdown
number of ops:  19
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'file_put_contents'
          1        SEND_VAL                                                     '%2Ftmp%2Ftest.txt'
          2        SEND_VAL                                                     'shutdown+1+%0A'
          3        SEND_VAL                                                     10
          4        DO_ICALL                                                     
    9     5        INIT_FCALL                                                   'file_put_contents'
          6        SEND_VAL                                                     '%2Ftmp%2Ftest.txt'
          7        SEND_VAL                                                     'shutdown+2+%0A'
          8        SEND_VAL                                                     10
          9        DO_ICALL                                                     
   11    10        INIT_FCALL                                                   'var_dump'
         11        INIT_FCALL                                                   'file_get_contents'
         12        SEND_VAL                                                     '%2Ftmp%2Ftest.txt'
         13        DO_ICALL                                             $2      
         14        SEND_VAR                                                     $2
         15        DO_ICALL                                                     
   12    16      > INIT_FCALL                                                   'exit'
         17*       DO_ICALL                                                     
   13    18*     > RETURN                                                       null

End of function shutdown

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
182.85 ms | 3059 KiB | 19 Q