Skip to content

Stdlib: show_source() — alias of highlight_file() (ext/standard/url.c parity) #3447

Description

@PurHur

Category

stdlib

Problem

show_source() is a legacy alias of highlight_file() in php-src. Scripts and docs still call show_source($file); this compiler has neither function (#3164 tracks highlight_file / highlight_string).

php-src reference

  • ext/standard/url.cPHP_FUNCTION(show_source)highlight_file(INTERNAL_FUNCTION_PARAM_PASSTHRU)
  • ext/standard/php_highlight.h — shared highlighter

Repro (today)

<?php
show_source(__FILE__);
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php repro.php'
Runtime Result
Zend HTML syntax-highlighted output
VM Call to undefined function show_source()

Scope (this repo)

Module Path
Builtin ext/standard/show_source.php — thin wrapper calling shared highlighter
Shared impl same module as #3164 (highlight_file / highlight_string)
Register ext/standard/Module.php
Matrix script/capability-matrix.php

Done when

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web apps

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions