3v4l.org

run code in 300+ PHP versions simultaneously
<?php $htmlWithScript = "<html><body><div>something></div><script type=\"text/javascript\"> var showShareBarUI_params_e81 = { buttonWithCountTemplate: '<div class=\"sBtnWrap\"><a href=\"#\" onclick=\"\$onClick\"><div class=\"sBtn\">\$text<img src=\"\$iconImg\" /></div><div class=\"sCountBox\">\$count</div></a></div>', } </script></body></html>"; $htmlWithoutScript = preg_replace_callback('~<script.*>.*~Uim', function($matches){ var_dump($matches);exit; return ''; }, $htmlWithScript); echo "nic"; var_dump($htmlWithoutScript);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LMMEg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $htmlWithScript, !1 = $htmlWithoutScript
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%3Cbody%3E%3Cdiv%3Esomething%3E%3C%2Fdiv%3E%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A++++var+showShareBarUI_params_e81+%3D%0A++++%7B%0A++++++++buttonWithCountTemplate%3A+%27%3Cdiv+class%3D%22sBtnWrap%22%3E%3Ca+href%3D%22%23%22+onclick%3D%22%24onClick%22%3E%3Cdiv+class%3D%22sBtn%22%3E%24text%3Cimg+src%3D%22%24iconImg%22+%2F%3E%3C%2Fdiv%3E%3Cdiv+class%3D%22sCountBox%22%3E%24count%3C%2Fdiv%3E%3C%2Fa%3E%3C%2Fdiv%3E%27%2C%0A++++%7D%0A%3C%2Fscript%3E%3C%2Fbody%3E%3C%2Fhtml%3E'
   14     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%7E%3Cscript.%2A%3E.%2A%7EUim'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLMMEg%3A14%240'
   17     4        SEND_VAL                                                 ~3
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
   14     7        ASSIGN                                                   !1, $4
   18     8        ECHO                                                     'nic'
   19     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FLMMEg%3A14%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/LMMEg
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
          4      > EXIT                                                     
   16     5*       RETURN                                                   ''
   17     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FLMMEg%3A14%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.64 ms | 1395 KiB | 17 Q