3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<p class="geo"> <abbr class="latitude" title="52.19166">52.19166</abbr> <abbr class="longitude" title="-2,23108">-2.23108</abbr> </p>'; preg_match('/class="latitude"\s*title="([^"]+)"/', $str, $lat); preg_match('/class="longitude"\s*title="([^"]+)"/', $str, $lon); echo '<latitude>'.$lat[1].'</latitude>'; echo '<longitude>'.$lon[1].'</longitude>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mMon1
function name:  (null)
number of ops:  20
compiled vars:  !0 = $str, !1 = $lat, !2 = $lon
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cp+class%3D%22geo%22%3E+%3Cabbr+class%3D%22latitude%22+title%3D%2252.19166%22%3E52.19166%3C%2Fabbr%3E+%3Cabbr+class%3D%22longitude%22+title%3D%22-2%2C23108%22%3E-2.23108%3C%2Fabbr%3E+%3C%2Fp%3E'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2Fclass%3D%22latitude%22%5Cs%2Atitle%3D%22%28%5B%5E%22%5D%2B%29%22%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2Fclass%3D%22longitude%22%5Cs%2Atitle%3D%22%28%5B%5E%22%5D%2B%29%22%2F'
          8        SEND_VAR                                                 !0
          9        SEND_REF                                                 !2
         10        DO_ICALL                                                 
    7    11        FETCH_DIM_R                                      ~6      !1, 1
         12        CONCAT                                           ~7      '%3Clatitude%3E', ~6
         13        CONCAT                                           ~8      ~7, '%3C%2Flatitude%3E'
         14        ECHO                                                     ~8
    8    15        FETCH_DIM_R                                      ~9      !2, 1
         16        CONCAT                                           ~10     '%3Clongitude%3E', ~9
         17        CONCAT                                           ~11     ~10, '%3C%2Flongitude%3E'
         18        ECHO                                                     ~11
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.59 ms | 1395 KiB | 15 Q