3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A{ private $data; function __construct(){ $this->data = [65 => 90, 97 => 122, 170 => 170, 181 => 181, 186 => 186, 192 => 214, 216 => 246, 248 => 705, 710 => 721, 736 => 740, 748 => 748, 750 => 750, 837 => 837, 880 => 884, 886 => 887, 890 => 893, 895 => 895, 902 => 902, 904 => 906, 908 => 908, 910 => 929, 931 => 1013, 1015 => 1153, 1162 => 1327, 1329 => 1366, 1369 => 1369, 1377 => 1415, 1456 => 1469, 1471 => 1471, 1473 => 1474, 1476 => 1477, 1479 => 1479, 1488 => 1514, 1520 => 1522, 1552 => 1562, 1568 => 1623, 1625 => 1631, 1646 => 1747, 1749 => 1756, 1761 => 1768, 1773 => 1775, 1786 => 1788, 1791 => 1791, 1808 => 1855, 1869 => 1969, 1994 => 2026, 2036 => 2037, 2042 => 2042, 2048 => 2071, 2074 => 2092, 2112 => 2136, 2208 => 2228, 2275 => 2281, 2288 => 2363, 2365 => 2380, 2382 => 2384, 2389 => 2403, 2417 => 2435, 2437 => 2444, 2447 => 2448, 2451 => 2472, 2474 => 2480, 2482 => 2482, 2486 => 2489, 2493 => 2500, 2503 => 2504, 2507 => 2508, 2510 => 2510, 2519 => 2519, 2524 => 2525, 2527 => 2531, 2544 => 2545, 2561 => 2563, 2565 => 2570, 2575 => 2576, 2579 => 2600, 2602 => 2608, 2610 => 2611, 2613 => 2614, 2616 => 2617, 2622 => 2626, 2631 => 2632, 2635 => 2636, 2641 => 2641, 2649 => 2652, 2654 => 2654, 2672 => 2677, 2689 => 2691, 2693 => 2701, 2703 => 2705, 2707 => 2728, 2730 => 2736, 2738 => 2739, 2741 => 2745, 2749 => 2757, 2759 => 2761, 2763 => 2764, 2768 => 2768, 2784 => 2787, 2809 => 2809, 2817 => 2819, 2821 => 2828, 2831 => 2832, 2835 => 2856, 2858 => 2864, 2866 => 2867, 2869 => 2873, 2877 => 2884, 2887 => 2888, 2891 => 2892, 2902 => 2903, 2908 => 2909, 2911 => 2915, 2929 => 2929, 2946 => 2947, 2949 => 2954, 2958 => 2960, 2962 => 2965, 2969 => 2970, 2972 => 2972, 2974 => 2975, 2979 => 2980, 2984 => 2986, 2990 => 3001, 3006 => 3010, 3014 => 3016, 3018 => 3020, 3024 => 3024, 3031 => 3031, 3072 => 3075, 3077 => 3084, 3086 => 3088, 3090 => 3112, 3114 => 3129, 3133 => 3140, 3142 => 3144, 3146 => 3148, 3157 => 3158, 3160 => 3162, 3168 => 3171, 3201 => 3203, 3205 => 3212, 3214 => 3216, 3218 => 3240, 3242 => 3251, 3253 => 3257, 3261 => 3268, 3270 => 3272, 3274 => 3276, 3285 => 3286, 3294 => 3294, 3296 => 3299, 3313 => 3314, 3329 => 3331, 3333 => 3340, 3342 => 3344, 3346 => 3386, 3389 => 3396, 3398 => 3400, 3402 => 3404, 3406 => 3406, 3415 => 3415, 3423 => 3427, 3450 => 3455, 3458 => 3459, 3461 => 3478, 3482 => 3505, 3507 => 3515, 3517 => 3517, 3520 => 3526, 3535 => 3540, 3542 => 3542, 3544 => 3551, 3570 => 3571, 3585 => 3642, 3648 => 3654, 3661 => 3661, 3713 => 3714, 3716 => 3716, 3719 => 3720, 3722 => 3722, 3725 => 3725, 3732 => 3735, 3737 => 3743, 3745 => 3747, 3749 => 3749, 3751 => 3751, 3754 => 3755, 3757 => 3769, 3771 => 3773, 3776 => 3780, 3782 => 3782, 3789 => 3789, 3804 => 3807, 3840 => 3840, 3904 => 3911, 3913 => 3948, 3953 => 3969, 3976 => 3991, 3993 => 4028, 4096 => 4150, 4152 => 4152, 4155 => 4159, 4176 => 4194, 4197 => 4200, 4206 => 4230, 4238 => 4238, 4252 => 4253, 4256 => 4293, 4295 => 4295, 4301 => 4301, 4304 => 4346, 4348 => 4680, 4682 => 4685, 4688 => 4694, 4696 => 4696, 4698 => 4701, 4704 => 4744, 4746 => 4749, 4752 => 4784, 4786 => 4789, 4792 => 4798, 4800 => 4800, 4802 => 4805, 4808 => 4822, 4824 => 4880, 4882 => 4885, 4888 => 4954, 4959 => 4959, 4992 => 5007, 5024 => 5109, 5112 => 5117, 5121 => 5740, 5743 => 5759, 5761 => 5786, 5792 => 5866, 5870 => 5880, 5888 => 5900, 5902 => 5907, 5920 => 5939, 5952 => 5971, 5984 => 5996, 5998 => 6000, 6002 => 6003, 6016 => 6067, 6070 => 6088, 6103 => 6103, 6108 => 6108, 6176 => 6263, 6272 => 6314, 6320 => 6389, 6400 => 6430, 6432 => 6443, 6448 => 6456, 6480 => 6509, 6512 => 6516, 6528 => 6571, 6576 => 6601, 6656 => 6683, 6688 => 6750, 6753 => 6772, 6823 => 6823, 6912 => 6963, 6965 => 6979, 6981 => 6987, 7040 => 7081, 7084 => 7087, 7098 => 7141, 7143 => 7153, 7168 => 7221, 7245 => 7247, 7258 => 7293, 7401 => 7404, 7406 => 7411, 7413 => 7414, 7424 => 7615, 7655 => 7668, 7680 => 7957, 7960 => 7965, 7968 => 8005, 8008 => 8013, 8016 => 8023, 8025 => 8025, 8027 => 8027, 8029 => 8029, 8031 => 8061, 8064 => 8116, 8118 => 8124, 8126 => 8126, 8130 => 8132, 8134 => 8140, 8144 => 8147, 8150 => 8155, 8160 => 8172, 8178 => 8180, 8182 => 8188, 8305 => 8305, 8319 => 8319, 8336 => 8348, 8450 => 8450, 8455 => 8455, 8458 => 8467, 8469 => 8469, 8473 => 8477, 8484 => 8484, 8486 => 8486, 8488 => 8488, 8490 => 8493, 8495 => 8505, 8508 => 8511, 8517 => 8521, 8526 => 8526, 8544 => 8584, 9398 => 9449, 11264 => 11310, 11312 => 11358, 11360 => 11492, 11499 => 11502, 11506 => 11507, 11520 => 11557, 11559 => 11559, 11565 => 11565, 11568 => 11623, 11631 => 11631, 11648 => 11670, 11680 => 11686, 11688 => 11694, 11696 => 11702, 11704 => 11710, 11712 => 11718, 11720 => 11726, 11728 => 11734]; } } $s = memory_get_usage(); $a1 = new A; echo memory_get_usage() - $s . "\n"; $s = memory_get_usage(); $a2 = new A; echo memory_get_usage() - $s . "\n"; $s = memory_get_usage(); $a3 = new A; echo memory_get_usage() - $s . "\n"; $s = memory_get_usage(); $a4 = new A; echo memory_get_usage() - $s . "\n";
based on Tsg3l
Output for 7.1.0 - 7.1.7
56 56 56 56
Output for 7.0.0 - 7.0.20
20592 20592 20592 20592
Output for 5.6.0 - 5.6.28
49848 49640 49640 49640
Output for 5.5.0 - 5.5.36
49856 49640 49640 49640