php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #3546 die function example incorrect?
Submitted: 2000-02-21 05:14 UTC Modified: 2005-11-11 18:04 UTC
From: sagawa at sohgoh dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 3.0.14 OS: Win95 etc...
Private report: No CVE-ID: None
 [2000-02-21 05:14 UTC] sagawa at sohgoh dot net
die() manual example 1 is below...
------------
<?php
$filename = '/path/to/data-file';
$file = fopen($filename, 'r')
  or die "unable to open file ($filename)";
?>
------------
but this makes a parse error (line 4),

So I correct this, below...
------------
<?php
$filename = '/path/to/data-file';
$file = fopen($filename, 'r')
  or die ("unable to open file ($filename)"); // () are required
?>
------------

Sorry, my poor English
Akihiro SAGAWA (Japanese)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-01 15:15 UTC] hholzgra at cvs dot php dot net
its already corrected in the phpdoc cvs
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 15:00:01 2026 UTC