0

I have seen this : Parse error: Invalid numeric literal But octal numbers is not my problem I using phone numbers as arguments in a function call; for example while running this code error occurred

<?php
var_dump(0917078452);

How can i solve this?

  • phone numbers and postal codes can start with "0". if you don't use it as a string php parses the integer without the 0 at at the start. `$int = 012344; echo $int;` this should show you 1234 and not 01234 as aspected – ElTi-42 Jan 10 '22 at 10:56
  • You have to write phone numbers and postcodes as strings. var_dump('0917078452'); – jspit Jan 10 '22 at 17:57

0 Answers0