3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((bool)preg_match('//u', "\xf0\x90\x8c\xbc")); var_dump(preg_match('/[\xf0-\xf7][\x90-\xbf][\x80-\xbf][\x80-\xbf]/', "\xf0\x90\x8c\xbc")); $xml = '<?xml version="1.0" encoding="utf-8"?>' . "<foo>\xf0\xa0\x9d\x8f</foo>"; $parsed = simplexml_load_string($xml); var_dump($parsed); var_dump((string)$parsed);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dm4RW
function name:  (null)
number of ops:  28
compiled vars:  !0 = $xml, !1 = $parsed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%2Fu'
          3        SEND_VAL                                                 '%F0%90%8C%BC'
          4        DO_ICALL                                         $2      
          5        BOOL                                             ~3      $2
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    3     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2F%5B%5Cxf0-%5Cxf7%5D%5B%5Cx90-%5Cxbf%5D%5B%5Cx80-%5Cxbf%5D%5B%5Cx80-%5Cxbf%5D%2F'
         11        SEND_VAL                                                 '%F0%90%8C%BC'
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
    4    15        ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%3Cfoo%3E%F0%A0%9D%8F%3C%2Ffoo%3E'
    7    16        INIT_FCALL                                               'simplexml_load_string'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $8      
         19        ASSIGN                                                   !1, $8
    8    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'var_dump'
         24        CAST                                          6  ~11     !1
         25        SEND_VAL                                                 ~11
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.95 ms | 1395 KiB | 19 Q