3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '/** * @var int * @Column(type="integer",name="id") * @Id * @GeneratedValue(strategy="AUTO") * @Webit({ "0": 1, "1": -2, "2": 3.333, "3": 4.0e+17, "4": "abc", "5": "\u00e1\n", "6": null, "7": [ 2.1, 2.2, [ "2.2.1" ] ], "8": false, "9": true, "10": "", "key": "value", "abc\"def": [] }) */'; preg_match("/@WebIT\((.*?)\)/i", $string, $output_array); var_dump($output_array);
based on lDGSc
Output for 4.3.0 - 7.2.0
array(2) { [0]=> string(190) "@Webit({ "0": 1, "1": -2, "2": 3.333, "3": 4.0e+17, "4": "abc", "5": "\u00e1\n", "6": null, "7": [ 2.1, 2.2, [ "2.2.1" ] ], "8": false, "9": true, "10": "", "key": "value", "abc\"def": [] })" [1]=> string(182) "{ "0": 1, "1": -2, "2": 3.333, "3": 4.0e+17, "4": "abc", "5": "\u00e1\n", "6": null, "7": [ 2.1, 2.2, [ "2.2.1" ] ], "8": false, "9": true, "10": "", "key": "value", "abc\"def": [] }" }