3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = <<<EOT start<body> Some text Some more text </body> text after body EOT; $regex = "/.*<body>(.*?)<\/body>/ms"; $result = preg_match( $regex, $str, $matches); print_r($matches[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dl2hr
function name:  (null)
number of ops:  13
compiled vars:  !0 = $str, !1 = $regex, !2 = $result, !3 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'start%3Cbody%3E%0ASome+text%0ASome+more+text%0A%3C%2Fbody%3E%0Atext+after+body'
   10     1        ASSIGN                                                       !1, '%2F.%2A%3Cbody%3E%28.%2A%3F%29%3C%5C%2Fbody%3E%2Fms'
   11     2        INIT_FCALL                                                   'preg_match'
          3        SEND_VAR                                                     !1
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !3
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !2, $6
   12     8        INIT_FCALL                                                   'print_r'
          9        FETCH_DIM_R                                          ~8      !3, 1
         10        SEND_VAL                                                     ~8
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.02 ms | 1754 KiB | 15 Q