3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $agent = "Mozilla/5.0 (iPad; CPU OS 10_3_2 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) CriOS/59.0.3071.102 Mobile/14F89 Safari/602.1"; echo 'v3.6.5 '; preg_match('|CriOS[/ ]([0-9.]+)|', $agent, $version); var_dump($version); list ($majorVersion, $minorVersion) = explode('.', $version[1]); echo 'v3.7.3 '; preg_match('/Chrome[\/ ]([0-9.]+)|CrMo[\/ ]([0-9.]+)|CriOS[\/ ]([0-9.]+)/i', $agent, $version); var_dump($version); list ($majorVersion, $minorVersion) = explode('.', $version[1]);
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/KVdRU
function name:  (null)
number of ops:  40
compiled vars:  !0 = $agent, !1 = $version, !2 = $majorVersion, !3 = $minorVersion
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, 'Mozilla%2F5.0+%28iPad%3B+CPU+OS+10_3_2+like+Mac+OS+X%29+AppleWebKit%2F603.1.30+%28KHTML%2C+like+Gecko%29+CriOS%2F59.0.3071.102+Mobile%2F14F89+Safari%2F602.1'
   5     1        ECHO                                                     'v3.6.5+'
   6     2        INIT_FCALL                                               'preg_match'
         3        SEND_VAL                                                 '%7CCriOS%5B%2F+%5D%28%5B0-9.%5D%2B%29%7C'
         4        SEND_VAR                                                 !0
         5        SEND_REF                                                 !1
         6        DO_ICALL                                                 
   7     7        INIT_FCALL                                               'var_dump'
         8        SEND_VAR                                                 !1
         9        DO_ICALL                                                 
   8    10        INIT_FCALL                                               'explode'
        11        SEND_VAL                                                 '.'
        12        FETCH_DIM_R                                      $7      !1, 1
        13        SEND_VAR                                                 $7
        14        DO_ICALL                                         $8      
        15        FETCH_LIST                                       $9      $8, 0
        16        ASSIGN                                                   !2, $9
        17        FETCH_LIST                                       $11     $8, 1
        18        ASSIGN                                                   !3, $11
        19        FREE                                                     $8
  10    20        ECHO                                                     'v3.7.3+'
  11    21        INIT_FCALL                                               'preg_match'
        22        SEND_VAL                                                 '%2FChrome%5B%5C%2F+%5D%28%5B0-9.%5D%2B%29%7CCrMo%5B%5C%2F+%5D%28%5B0-9.%5D%2B%29%7CCriOS%5B%5C%2F+%5D%28%5B0-9.%5D%2B%29%2Fi'
        23        SEND_VAR                                                 !0
        24        SEND_REF                                                 !1
        25        DO_ICALL                                                 
  12    26        INIT_FCALL                                               'var_dump'
        27        SEND_VAR                                                 !1
        28        DO_ICALL                                                 
  13    29        INIT_FCALL                                               'explode'
        30        SEND_VAL                                                 '.'
        31        FETCH_DIM_R                                      $15     !1, 1
        32        SEND_VAR                                                 $15
        33        DO_ICALL                                         $16     
        34        FETCH_LIST                                       $17     $16, 0
        35        ASSIGN                                                   !2, $17
        36        FETCH_LIST                                       $19     $16, 1
        37        ASSIGN                                                   !3, $19
        38        FREE                                                     $16
        39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0