3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = simplexml_load_string("<segurado> <nomeSegurado>EMERSON DA SILVA BRULL</nomeSegurado> <numeroCpfCnpj>345769118</numeroCpfCnpj> <ordemCnpj>0</ordemCnpj> <digitoCpfCnpj>56</digitoCpfCnpj> <statusSegurado>2</statusSegurado> <corretores> <susep>V2064F</susep> <susep>P5005J</susep> <susep>P2371J</susep> </corretores> </segurado>"); $result = json_decode(json_encode((array) $result)); $result = get_object_vars($result->corretores); var_dump($result['susep]);
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected ''susep]);' (T_ENCAPSED_AND_WHITESPACE), expecting ']' in /in/0ppOW on line 19
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /in/0ppOW on line 19
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /in/0ppOW on line 19 Notice: Use of undefined constant susep - assumed 'susep' in /in/0ppOW on line 19 array(3) { [0]=> string(6) "V2064F" [1]=> string(6) "P5005J" [2]=> string(6) "P2371J" }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
Parse error: syntax error, unexpected $end in /in/0ppOW on line 19
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected $ in /in/0ppOW on line 19
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/0ppOW on line 19
Process exited with code 255.

preferences:
215.74 ms | 1395 KiB | 123 Q