3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = " total used free shared buffers cached\nMem: 494 383 111 0 29 200\n-/+ buffers/cache: 153 341\nSwap: 255 0 255"; preg_match("/Mem:\s+(?P<total>\d+)\s+(?P<used>\d+)\s+(?P<free>\d+)\s+(?P<shared>\d+)\s+(?P<buffers>\d+)\s+(?P<cached>\d+)/", $c ,$r); print_r($r); preg_match("/Swap:s+(?P<swapTotal>\d+)s+(?P<swapUsed>\d+)s+(?P<swapFree>\d+)/", $c ,$r); print_r($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LSMoM
function name:  (null)
number of ops:  18
compiled vars:  !0 = $c, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '+++++++++++++total+++++++used+++++++free+++++shared++++buffers+++++cached%0AMem%3A+++++++++++494++++++++383++++++++111++++++++++0+++++++++29++++++++200%0A-%2F%2B+buffers%2Fcache%3A++++++++153++++++++341%0ASwap%3A++++++++++255++++++++++0++++++++255'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2FMem%3A%5Cs%2B%28%3FP%3Ctotal%3E%5Cd%2B%29%5Cs%2B%28%3FP%3Cused%3E%5Cd%2B%29%5Cs%2B%28%3FP%3Cfree%3E%5Cd%2B%29%5Cs%2B%28%3FP%3Cshared%3E%5Cd%2B%29%5Cs%2B%28%3FP%3Cbuffers%3E%5Cd%2B%29%5Cs%2B%28%3FP%3Ccached%3E%5Cd%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2FSwap%3As%2B%28%3FP%3CswapTotal%3E%5Cd%2B%29s%2B%28%3FP%3CswapUsed%3E%5Cd%2B%29s%2B%28%3FP%3CswapFree%3E%5Cd%2B%29%2F'
         11        SEND_VAR                                                 !0
         12        SEND_REF                                                 !1
         13        DO_ICALL                                                 
   10    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.2 ms | 1395 KiB | 17 Q