3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myString = '10:0{ "name":"John", "age":30, "car":null }24:0'; echo preg_replace('/.*?(\{.*?\}).*/', '$1', $myString);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/afN8B
function name:  (null)
number of ops:  8
compiled vars:  !0 = $myString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '10%3A0%7B+%22name%22%3A%22John%22%2C+%22age%22%3A30%2C+%22car%22%3Anull+%7D24%3A0'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F.%2A%3F%28%5C%7B.%2A%3F%5C%7D%29.%2A%2F'
          3        SEND_VAL                                                 '%241'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
218.5 ms | 1000 KiB | 14 Q