Vscode-intelephense: array_push as undefined function

Created on 11 Dec 2019  路  5Comments  路  Source: bmewburn/vscode-intelephense

It shows array_push as undefined function even in some basic code.

To Reproduce

<?php

$tmp = [];
$tmp2 = [];
$tmp2[] = 'aaa';
array_push($tmp, $tmp2);

Expected behavior
it shows as defined function

Screenshots

image

Platform and version
Windows VSCODE, remote SSH to Debian, version 1.3.3

upstream

Most helpful comment

Somebody set array_push as @since 7.3... https://github.com/JetBrains/phpstorm-stubs/blob/534dac2ac3b2e853298d52f29a339c17fb70ba91/standard/standard_8.php#L1018

Will work if you set 7.3 or higher
"intelephense.environment.phpVersion": "7.3.0"

Made PR https://github.com/JetBrains/phpstorm-stubs/pull/713

All 5 comments

Have you changed intelephense.stubs setting?

Have you changed intelephense.stubs setting?

No, for example array_merge is working without problems

image

Somebody set array_push as @since 7.3... https://github.com/JetBrains/phpstorm-stubs/blob/534dac2ac3b2e853298d52f29a339c17fb70ba91/standard/standard_8.php#L1018

Will work if you set 7.3 or higher
"intelephense.environment.phpVersion": "7.3.0"

Made PR https://github.com/JetBrains/phpstorm-stubs/pull/713

Wow! Nice find @KapitanOczywisty

Merged may be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zlianon picture zlianon  路  4Comments

muuvmuuv picture muuvmuuv  路  4Comments

ghost picture ghost  路  3Comments

dgunay picture dgunay  路  3Comments

pseudoanime picture pseudoanime  路  3Comments