3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Via Alsazia 3 Scala A Int 1 35127 PADOVA (PD) 049 774266 049 775756'; $parts = explode(' ',$str); $phone1 = array_pop($parts); $phone1 = array_pop($parts)." ".$phone1; $phone2 = array_pop($parts); $phone2 = array_pop($parts)." ".$phone2; echo $phone1."\n"; echo $phone2."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qp0kS
function name:  (null)
number of ops:  31
compiled vars:  !0 = $str, !1 = $parts, !2 = $phone1, !3 = $phone2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Via+Alsazia+3+Scala+A+Int+1+35127+PADOVA+%28PD%29+049+774266+049+775756'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        INIT_FCALL                                               'array_pop'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    6    10        INIT_FCALL                                               'array_pop'
         11        SEND_REF                                                 !1
         12        DO_ICALL                                         $9      
         13        CONCAT                                           ~10     $9, '+'
         14        CONCAT                                           ~11     ~10, !2
         15        ASSIGN                                                   !2, ~11
    7    16        INIT_FCALL                                               'array_pop'
         17        SEND_REF                                                 !1
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !3, $13
    8    20        INIT_FCALL                                               'array_pop'
         21        SEND_REF                                                 !1
         22        DO_ICALL                                         $15     
         23        CONCAT                                           ~16     $15, '+'
         24        CONCAT                                           ~17     ~16, !3
         25        ASSIGN                                                   !3, ~17
   10    26        CONCAT                                           ~19     !2, '%0A'
         27        ECHO                                                     ~19
   11    28        CONCAT                                           ~20     !3, '%0A'
         29        ECHO                                                     ~20
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
225.77 ms | 999 KiB | 15 Q