3v4l.org

run code in 300+ PHP versions simultaneously
<?php $examples = array( 'Valid ASCII' => "a", 'Valid 2 Octet Sequence' => "\xc3\xb1", 'Invalid 2 Octet Sequence' => "\xc3\x28", 'Invalid Sequence Identifier' => "\xa0\xa1", 'Valid 3 Octet Sequence' => "\xe2\x82\xa1", 'Invalid 3 Octet Sequence (in 2nd Octet)' => "\xe2\x28\xa1", 'Invalid 3 Octet Sequence (in 3rd Octet)' => "\xe2\x82\x28", 'Invalid 3 Octet Sequence (surrogate pair)' => "\xed\xa0\x80", 'Valid 4 Octet Sequence' => "\xf0\x90\x8c\xbc", 'Invalid 4 Octet Sequence (in 2nd Octet)' => "\xf0\x28\x8c\xbc", 'Invalid 4 Octet Sequence (in 3rd Octet)' => "\xf0\x90\x28\xbc", 'Invalid 4 Octet Sequence (in 4th Octet)' => "\xf0\x28\x8c\x28", 'Valid 5 Octet Sequence (but not Unicode!)' => "\xf8\xa1\xa1\xa1\xa1", 'Valid 6 Octet Sequence (but not Unicode!)' => "\xfc\xa1\xa1\xa1\xa1\xa1", ); foreach ($examples as $k => $v) { echo "{$k}\n"; echo var_dump((bool)preg_match("//u", $v)); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/ETKqR
function name:  (null)
number of ops:  20
compiled vars:  !0 = $examples, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1      > FE_RESET_R                                       $4      !0, ->18
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->18
          3    >   ASSIGN                                                   !2, ~5
   24     4        NOP                                                      
          5        FAST_CONCAT                                      ~7      !2, '%0A'
          6        ECHO                                                     ~7
   25     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'preg_match'
          9        SEND_VAL                                                 '%2F%2Fu'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        BOOL                                             ~9      $8
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
   26    16        ECHO                                                     '%0A'
   22    17      > JMP                                                      ->2
         18    >   FE_FREE                                                  $4
   28    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.31 ms | 1395 KiB | 17 Q