Skip to content

Conversation

AllenJB
Copy link
Contributor

@AllenJB AllenJB commented Sep 28, 2025

Related to #4799

Including fixing markup to make sure output replacement works correctly.

Additional changes I made:

  • Normalize examples to omit unnecessary trailing ?> (PER coding style, also I see new users using this too often and suspect the manual is partly to blame)
  • Moved an example from date() to mktime() (it primarily uses mktime(), and there's alternative (IMO better) ways to do that);
  • Added missing output examples where appropriate;
  • Modified microtime() examples to more reliably output something other than "0";
  • Corrected plurality of "above example(s)";
  • Misc. other minor typos and updates for deprecations

The first example on strftime() isn't working. I suspect this is due to the WASM environment not having locales or something. Since the function is deprecated I decided not to both investigating too deeply and just marked it as not runnable.

AllenJB added a commit to AllenJB/doc-en that referenced this pull request Sep 28, 2025
<programlisting role="php">
<![CDATA[
<?php
Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use DatePeriod::createFromISO8601String() instead in script on line 11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? Did you accidently put this in the wrong place?

</programlisting>
&example.outputs;
<screen>
<![CDATA[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<![CDATA[
<![CDATA[

</programlisting>
&example.outputs;
<screen>
<![CDATA[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<![CDATA[
<![CDATA[

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you split it up? Both examples should produce identical output and there should only be one output section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants