3v4l.org

run code in 300+ PHP versions simultaneously
<?php $utf8string = 'Agence immobilière Dossenheim met en vente duplex a Jdaida d’une superficie 100m² composée d’un salon ,salle à manger, cuisine, 3 chambres à coucher, salle de bain et une salle d’eau ,d’un prix négociable 70MDT avec titre foncier indépendant Pour tout contact'; $var = 'vente'; $pos = strpos($utf8string, $var); if ($pos!==false) { echo substr($utf8string, $pos-20, $pos+20); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/Q6rRf
function name:  (null)
number of ops:  18
compiled vars:  !0 = $utf8string, !1 = $var, !2 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Agence+immobili%C3%A8re+Dossenheim+met+en+vente+duplex+a+Jdaida+d%E2%80%99une+superficie+100m%C2%B2+compos%C3%A9e+d%E2%80%99un+salon+%2Csalle+%C3%A0+manger%2C+cuisine%2C+3+chambres+%C3%A0+coucher%2C+salle+de+bain+et+une+salle+d%E2%80%99eau+%2Cd%E2%80%99un+prix+n%C3%A9gociable+70MDT+avec+titre+foncier+ind%C3%A9pendant+Pour+tout+contact'
    5     1        ASSIGN                                                   !1, 'vente'
    6     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        TYPE_CHECK                                  1018          !2
          8      > JMPZ                                                     ~7, ->17
    8     9    >   INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SUB                                              ~8      !2, 20
         12        SEND_VAL                                                 ~8
         13        ADD                                              ~9      !2, 20
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                         $10     
         16        ECHO                                                     $10
    9    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.07 ms | 1399 KiB | 17 Q