3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row["height"] = '(163 cm)'; $string= $row['height']; $pos1 = strpos($string, "("); $pos2 = strpos($string, "cm", $pos1); $text = substr($string,$pos1+1,$pos2-2+$pos1); echo $text; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hQLtO
function name:  (null)
number of ops:  26
compiled vars:  !0 = $row, !1 = $string, !2 = $pos1, !3 = $pos2, !4 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'height'
          1        OP_DATA                                                  '%28163+cm%29'
    3     2        FETCH_DIM_R                                      ~6      !0, 'height'
          3        ASSIGN                                                   !1, ~6
    5     4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 '%28'
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
    7     9        INIT_FCALL                                               'strpos'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 'cm'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !3, $10
    9    15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !1
         17        ADD                                              ~12     !2, 1
         18        SEND_VAL                                                 ~12
         19        SUB                                              ~13     !3, 2
         20        ADD                                              ~14     ~13, !2
         21        SEND_VAL                                                 ~14
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !4, $15
   10    24        ECHO                                                     !4
   11    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.44 ms | 1400 KiB | 17 Q