This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://playground.wordpress.net/blueprint-schema.json", | |
"landingPage": "https://playground.wordpress.net/wp-admin/", | |
"preferredVersions": { | |
"php": "8.3", | |
"wp": "6.5" | |
}, | |
"phpExtensionBundles": [ | |
"kitchen-sink" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ATTENTION: Please update Playground's .htaccess file as necessary | |
* whenever making changes here. | |
*/ | |
define('PLAYGROUND_DEBUG', false); | |
playground_handle_request(); | |
function playground_handle_request() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initial memory usage: 0.35476684570312 MB | |
Memory limit: 128M | |
* memory_get_usage(false): 1.3586730957031 MB | |
* memory_get_usage(true): 20 MB | |
* memory_get_usage(false): 2.4172821044922 MB | |
* memory_get_usage(true): 22.0625 MB | |
* memory_get_usage(false): 3.4172821044922 MB | |
* memory_get_usage(true): 23.0625 MB | |
* memory_get_usage(false): 4.4172821044922 MB | |
* memory_get_usage(true): 24.0625 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wasm_memory_storage_chunk_alloc: attempt | |
wasm_memory_storage_chunk_alloc: addr: 0x1200000 size: 2097152, align: 2097152 | |
wasm_memory_storage_chunk_alloc: attempt | |
wasm_memory_storage_chunk_alloc: addr: 0x1a00000 size: 2097152, align: 2097152 | |
wasm_memory_storage_chunk_alloc: attempt | |
wasm_memory_storage_chunk_alloc: addr: 0x1e00000 size: 2097152, align: 2097152 | |
wasm_memory_storage_chunk_alloc: attempt | |
wasm_memory_storage_chunk_alloc: addr: 0x2600000 size: 2097152, align: 2097152 | |
wasm_memory_storage_chunk_alloc: attempt | |
wasm_memory_storage_chunk_alloc: addr: 0x2a00000 size: 2097152, align: 2097152 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isURLScoped(e){return e.pathname.startsWith("/scope:")}function getURLScope(e){return isURLScoped(e)?e.pathname.split("/")[1].split(":")[1]:null}function setURLScope(e,t){let r=new URL(e);if(isURLScoped(r))if(t){const s=r.pathname.split("/");s[1]=`scope:${t}`,r.pathname=s.join("/")}else r=removeURLScope(r);else if(t){const s=r.pathname==="/"?"":r.pathname;r.pathname=`/scope:${t}${s}`}return r}function removeURLScope(e){if(!isURLScoped(e))return e;const t=new URL(e),r=t.pathname.split("/");return t.pathname="/"+r.slice(2).join("/"),t}const currentJsRuntime=function(){return typeof process<"u"&&process.release?.name==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(currentJsRuntime==="NODE"){let e=function(r){return new Promise(function(s,n){r.onload=r.onerror=function(i){r.onload=r.onerror=null,i.type==="load"?s(r.result):n(new Error("Failed to read the blob/file"))}})},t=function(){const r=new Uint8Array([1,2,3,4]),n=new File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('memory_limit', '1G'); | |
function useAllMemory() { | |
echo "Initial memory limit: " . ini_get( 'memory_limit' ) . '<br>'; | |
echo "Initial memory usage: " . (memory_get_usage()/(1024*1024)) . ' MB <br>'; | |
echo "<br>"; | |
$data = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initial memory limit: 64M | |
Initial memory usage: 0.38388824462891 MB | |
* iteration: 0 | |
* strlen(): 0.0625 MB | |
* memory_get_usage(): 0.45029449462891 MB | |
* aggregate strlen()'s: 0.0625 MB | |
* iteration: 1 | |
* strlen(): 0.125 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/php-wasm/compile/php/Dockerfile b/packages/php-wasm/compile/php/Dockerfile | |
index fdc458d0..c97f8606 100644 | |
--- a/packages/php-wasm/compile/php/Dockerfile | |
+++ b/packages/php-wasm/compile/php/Dockerfile | |
@@ -809,20 +809,21 @@ RUN set -euxo pipefail; \ | |
"_wasm_set_content_type", \n\ | |
"_wasm_set_cookies", \n\ | |
"_wasm_set_path_translated", \n\ | |
"_wasm_set_php_code", \n\ | |
"_wasm_set_query_string", \n\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn get<T, U: From<T>>(s: T) -> U { | |
U::from(s) | |
} | |
fn main() { | |
let x: u64 = get(123u8); | |
println!("{:064b}", x); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp.domReady( function () { | |
var button = document.getElementById( 'mbwr-meta-box-button' ); | |
var container = document.getElementById( 'mbwr-meta-box-media-upload' ); | |
// NOTE: I'm not sure what timing issue this is avoiding, but it's necessary to avoid error. | |
setTimeout( function () { | |
wp.element.render( | |
wp.element.createElement( wp.editor.PostFeaturedImage ), | |
container | |
); |
NewerOlder