PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, February 27, 2022

[FIXED] Is header with string keyword new in PHP?

 February 27, 2022     facebook-php-sdk, header, php     No comments   

Issue

In one of YouTube tutorial I came across this

header( string: 'location: login.php' );

It issues a syntax error on ':' for me but works fine for him. This works fine for me without 'string:' but wants to know the reason.

This code is used for FB login plugin in this tutorial. Here's the link https://youtu.be/1DgzTWr3F2I

19:00 min

My PHP version is 5.6.24


Solution

That string: is just an IDE helper to tell you that the parameter expected is called string, it's not actually in the code.

Let me guess, is the tutorial person using IntelliJ Idea or PhpStorm? They implemented it this year

About the second error, the -> sign must not have spaces between the method and the object.



Answered By - forsureitsme
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing