skip to Main Content

In PHP (version 7.1), I am attempting to use a MAP as opposed to a two dimensional array to handle implicit data type conversion across different data type groups. However, I am receiving the following run-time error:

Class ‘DsMap’ not found

The error occurs on this line of code:

protected $hive_data_type_group_map = new DsMap();

I have checked online, but there is little documentation on DsMap, even on PHP’s website (click here). Does anyone know how to fix this?

3

Answers


  1. Data Structures is not a built-in PHP extension.

    It needs to be installed before use. The installation instructions are available on php.net.

    Login or Signup to reply.
  2. For windows

    Download compiled-dll file “php_ds.dll” from https://pecl.php.net/package/ds. Place it in your dir wampbinphp[your_php_version_folder]ext and include it in your “.ini” file.

    It worked for me.

    Login or Signup to reply.
  3. the easiest way on ubuntu:

    pecl install ds
    

    Reference: https://www.php.net/manual/en/ds-deque.allocate.php

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search