in runtime/php/v8.2/compile.php [92:115]
function build(string $shim, string $src, string $main) : void
{
$shim_env_file = sprintf("%s.env", $shim);
$contents = <<<EOT
#!/bin/bash
if [[ "\$__OW_EXECUTION_ENV" == "" || "\$(cat $shim_env_file)" == "\$__OW_EXECUTION_ENV" ]]
then cd $src
exec php -f /bin/runner.php -- "$main"
else echo "Execution Environment Mismatch"
echo "Expected: \$(cat $shim_env_file)"
echo "Actual: \$__OW_EXECUTION_ENV"
exit 1
fi
EOT;
write_file($shim, $contents, true);
$ow_exec_env = getenv('__OW_EXECUTION_ENV');
if ($ow_exec_env!==false) {
// write shim env file
write_file($shim_env_file, $ow_exec_env);
}
}