3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is day 7 of the task'; if ($int = filter_var($string, FILTER_SANITIZE_NUMBER_INT)) { echo "Found \"$int\" inside of $string"; } else { echo "No integers found inside of $string"; } echo "\n---\n"; $string = 'This is a day of the week'; if ($int = filter_var($string, FILTER_SANITIZE_NUMBER_INT)) { echo "Found \"$int\" inside of \"$string\""; } else { echo "No integers found inside of \"$string\""; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
Branch analysis from position: 31
filename:       /in/uOOKC
function name:  (null)
number of ops:  36
compiled vars:  !0 = $string, !1 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'This+is+day+7+of+the+task'
    3     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 519
          4        DO_ICALL                                         $3      
          5        ASSIGN                                           ~4      !1, $3
          6      > JMPZ                                                     ~4, ->13
    4     7    >   ROPE_INIT                                     4  ~6      'Found+%22'
          8        ROPE_ADD                                      1  ~6      ~6, !1
          9        ROPE_ADD                                      2  ~6      ~6, '%22+inside+of+'
         10        ROPE_END                                      3  ~5      ~6, !0
         11        ECHO                                                     ~5
    3    12      > JMP                                                      ->16
    6    13    >   NOP                                                      
         14        FAST_CONCAT                                      ~8      'No+integers+found+inside+of+', !0
         15        ECHO                                                     ~8
    9    16    >   ECHO                                                     '%0A---%0A'
   11    17        ASSIGN                                                   !0, 'This+is+a+day+of+the+week'
   12    18        INIT_FCALL                                               'filter_var'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 519
         21        DO_ICALL                                         $10     
         22        ASSIGN                                           ~11     !1, $10
         23      > JMPZ                                                     ~11, ->31
   13    24    >   ROPE_INIT                                     5  ~13     'Found+%22'
         25        ROPE_ADD                                      1  ~13     ~13, !1
         26        ROPE_ADD                                      2  ~13     ~13, '%22+inside+of+%22'
         27        ROPE_ADD                                      3  ~13     ~13, !0
         28        ROPE_END                                      4  ~12     ~13, '%22'
         29        ECHO                                                     ~12
   12    30      > JMP                                                      ->35
   15    31    >   ROPE_INIT                                     3  ~17     'No+integers+found+inside+of+%22'
         32        ROPE_ADD                                      1  ~17     ~17, !0
         33        ROPE_END                                      2  ~16     ~17, '%22'
         34        ECHO                                                     ~16
   16    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
294.64 ms | 1011 KiB | 14 Q