Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Compute php version #16

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

homersimpsons
Copy link
Contributor

Hardcoded phpversion may be outdated as we use the latest available wasm.

Hardcoded phpversion may be outdated as we use the latest available wasm.
@homersimpsons homersimpsons force-pushed the chore/compute-phpversion branch from 0ab9d8e to 53db8dc Compare July 23, 2024 16:09
@homersimpsons homersimpsons marked this pull request as draft July 25, 2024 12:54
@SjonHortensius SjonHortensius self-requested a review July 25, 2024 12:54
Comment on lines +222 to +227
// Compute version
const phpVersionRunner = new PhpWeb()
phpVersionRunner.addEventListener('output', (event) => {
$('#phpversion').textContent = "Output for php " + event.detail[0]
});
phpVersionRunner.run('<?php echo phpversion();')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now we are forced to run php to get this information.

In the future we will be able to use PhpWeb.phpVersion

Suggested change
// Compute version
const phpVersionRunner = new PhpWeb()
phpVersionRunner.addEventListener('output', (event) => {
$('#phpversion').textContent = "Output for php " + event.detail[0]
});
phpVersionRunner.run('<?php echo phpversion();')
// Set PHP version in the UI
$('#phpversion').textContent = "Output for php " + PhpWeb.phpVersion
phpVersionRunner.run('<?php echo phpversion();')

We can "opt-in" to this by using https://cdn.jsdelivr.net/npm/[email protected]/PhpWeb.mjs instead of the current latest version v0.0.8.

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.

1 participant