100, // 32098 (DINT) "1" => 2, "2" => 0, "3" => 0, "4" => 100, // 32098 (DINT) "5" => 2 ); // Print mixed values try { echo PhpType::bytes2unsignedInt(array_slice($data, 0, 1)) . "
"; } catch(Exception $e) { echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; } try { echo PhpType::bytes2unsignedInt(array_slice($data, 0, 2)). "
"; } catch(Exception $e) { echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; } try { echo PhpType::bytes2unsignedInt(array_slice($data, 0, 3)). "
"; } catch(Exception $e) { echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; } try { echo PhpType::bytes2unsignedInt(array_slice($data, 0, 4)). "
"; } catch(Exception $e) { echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; } try { echo PhpType::bytes2unsignedInt(array_slice($data, 0, 5)). "
"; } catch(Exception $e) { echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; } ?>