Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Deprecated: Function split() is deprecated

Deprecated: Function split() is deprecated

Scheduled Pinned Locked Moved Web Development
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    Hi, Why I am getting above error for below code? It was working fine when I use the PHP class only but started giving this error when I am calling the class from another PHP page. How to fix it please?

    function IPv4Tonumber($ip_to_convert)
    {
    if ($ip_to_convert == "")
    {
    return 0;
    }
    else
    {
    $ips = split("\.", "$ip_to_convert");
    return ($ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256);
    }
    }

    Thanks, Jassim[^]

    Technology News @ www.JassimRahma.com

    L 1 Reply Last reply
    0
    • J Jassim Rahma

      Hi, Why I am getting above error for below code? It was working fine when I use the PHP class only but started giving this error when I am calling the class from another PHP page. How to fix it please?

      function IPv4Tonumber($ip_to_convert)
      {
      if ($ip_to_convert == "")
      {
      return 0;
      }
      else
      {
      $ips = split("\.", "$ip_to_convert");
      return ($ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256);
      }
      }

      Thanks, Jassim[^]

      Technology News @ www.JassimRahma.com

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Jassim Rahma wrote:

      Why I am getting above error for below code?

      Check the documentation: PHP: split - Manual[^].

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups