3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This should produce failures when using a version of libpcre older than 8.32 */ // Ignore versions other than 5.3-5.5 if (!preg_match('/^5\.[345]\./', phpversion())) { print "Don't care about this version\n"; exit(0); } preg_match('/((?:a?)*)*c/', 'aac', $matches); if ($matches[1] === 'aa') { print "FAIL\n"; } else { print "PASS\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uljrn
function name:  (null)
number of ops:  22
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F%5E5%5C.%5B345%5D%5C.%2F'
          2        INIT_FCALL                                               'phpversion'
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > JMPZ                                                     ~3, ->10
    8     8    >   ECHO                                                     'Don%27t+care+about+this+version%0A'
    9     9      > EXIT                                                     0
   12    10    >   INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%2F%28%28%3F%3Aa%3F%29%2A%29%2Ac%2F'
         12        SEND_VAL                                                 'aac'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                                 
   13    15        FETCH_DIM_R                                      ~5      !0, 1
         16        IS_IDENTICAL                                             ~5, 'aa'
         17      > JMPZ                                                     ~6, ->20
   14    18    >   ECHO                                                     'FAIL%0A'
         19      > JMP                                                      ->21
   16    20    >   ECHO                                                     'PASS%0A'
   17    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.72 ms | 1395 KiB | 17 Q