php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76236 Compiler bug within multi dimentional array
Submitted: 2018-04-18 14:41 UTC Modified: 2018-04-18 14:43 UTC
From: onesong at gmail dot com Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 5.6.35 OS: Windows 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: onesong at gmail dot com
New email:
PHP Version: OS:

 

 [2018-04-18 14:41 UTC] onesong at gmail dot com
Description:
------------
the script below gives this wrror I couldnt understand where the syntax error is perhaps and most probably is a error within the compiling code to this php version

Parse error: syntax error, unexpected ';', expecting ')' in /srv/disk5/2354589/www/eternalglory.ga/index.php on line 7

Test script:
---------------
  public $Themes = array(
  "std" => array("cellspacing" => "0", "cellpadding" => "0", "tablestyle" => array("margin: 0px 0px; font: 20px arial, sans-serif;"),
  "transw" => array("cellspacing" => "0", "cellpadding" => "0", "tablestyle" => array("margin: 0px 0px; font: 20px arial, sans-serif;"),
  "matrix" => array("cellspacing" => "0", "cellpadding" => "0", "tablestyle" => array("margin: 0px 0px; font: 20px arial, sans-serif;")
  ); 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-18 14:43 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2018-04-18 14:43 UTC] requinix@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Count your parentheses.

Install an IDE that has syntax highlighting support. There are many to choose from.
 [2018-04-18 14:54 UTC] spam2 at rhsoft dot net
if you only would write readable code you wild see the problem with an eye-blink of at least use a proper IDE which shows you the closing braces when you point the cursor to a opening one

there are 7 ( and you managed to miss THREE closing )
for that i don't need the PHP parser, my IDE is crying

<?php
$Themes = array
(
 "std" => 
 array
 (
  "cellspacing" => "0", 
  "cellpadding" => "0",
  "tablestyle" => 
  array
  (
   "margin: 0px 0px; font: 20px arial, sans-serif;"
  ),
  "transw" => 
  array
  (
   "cellspacing" => "0", "cellpadding" => "0",
   "tablestyle" => 
   array
   (
    "margin: 0px 0px; font: 20px arial, sans-serif;"
   ),
   "matrix" => 
   array
   (
    "cellspacing" => "0", "cellpadding" => "0",
    "tablestyle" => 
    array
    ( 
     "margin: 0px 0px; font: 20px arial, sans-serif;"
    )
);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 05:01:28 2024 UTC